7
7
workflow_dispatch :
8
8
inputs :
9
9
tag_name :
10
- description : ' Docker image tag to use for the package'
11
- required : true
12
- default : ' dev'
10
+ description : ' Docker image tag to use for the package (default to selected branch name)'
11
+ required : false
13
12
commit_sha :
14
- description : ' Commit SHA to checkout'
15
- required : true
13
+ description : ' Commit SHA to checkout (default to latest commit on selected branch) '
14
+ required : false
16
15
set_as_latest :
17
16
description : ' Set the tag as latest'
18
17
required : false
@@ -23,9 +22,8 @@ permissions:
23
22
packages : write
24
23
25
24
env :
26
- TAG_NAME : ${{ github.ref_name || github.event.inputs.tag_name }}
27
- REF_NAME : ${{ github.ref || github.event.inputs.commit_sha }}
28
- COMMIT_SHA : ${{ github.sha || github.event.inputs.commit_sha }}
25
+ TAG_NAME : ${{ github.event.inputs.tag_name || github.ref_name }}
26
+ COMMIT_SHA : ${{ github.event.inputs.commit_sha || github.sha }}
29
27
PUSH_LATEST : ${{ github.event.inputs.set_as_latest || 'true' }}
30
28
REGISTRY_IMAGE : ghcr.io/datadog/dd-trace-go/service-extensions-callout
31
29
45
43
- name : Checkout
46
44
uses : actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
47
45
with :
48
- ref : ${{ env.REF_NAME }}
46
+ ref : ${{ env.COMMIT_SHA }}
49
47
50
48
- name : Install Docker (only arm64)
51
49
if : matrix.platform == 'linux/arm64'
@@ -119,9 +117,13 @@ jobs:
119
117
id : tags
120
118
run : |
121
119
tagname=${TAG_NAME//\//-} # remove slashes from tag name
122
- echo "tags=-t ghcr.io/datadog/dd-trace-go/service-extensions-callout:${tagname} \
123
- -t ghcr.io/datadog/dd-trace-go/service-extensions-callout:${{ env.COMMIT_SHA }} \
124
- ${{ env.PUSH_LATEST == 'true' && '-t ghcr.io/datadog/dd-trace-go/service-extensions-callout:latest' }}" >> $GITHUB_OUTPUT
120
+ tags="tags=-t ghcr.io/datadog/dd-trace-go/service-extensions-callout:${tagname} \
121
+ -t ghcr.io/datadog/dd-trace-go/service-extensions-callout:${{ env.COMMIT_SHA }}"
122
+ if [ "${PUSH_LATEST}" == "true" ]; then
123
+ tags="$tags -t ghcr.io/datadog/dd-trace-go/service-extensions-callout:latest"
124
+ fi
125
+
126
+ echo $tags >> $GITHUB_OUTPUT
125
127
126
128
- name : Create manifest list and push
127
129
working-directory : /tmp/digests
0 commit comments