File tree Expand file tree Collapse file tree 3 files changed +13
-8
lines changed
Expand file tree Collapse file tree 3 files changed +13
-8
lines changed Original file line number Diff line number Diff line change 1515 tag :
1616 description : ' Tag to publish'
1717 required : true
18- default : ' latest'
18+ default : ' type=raw,value= latest'
1919
2020permissions :
2121 contents : read
Original file line number Diff line number Diff line change @@ -33,18 +33,23 @@ jobs:
3333 # Remove leading "v" from tag name
3434 TRIMMED_REF_NAME="${REF_NAME#v}"
3535
36- # Creates a comma separated list of tags
37- # - <major>.<minor>
38- # - <major>.<minor>.<patch>
39- OUTPUT_TAGS="${TRIMMED_REF_NAME%.*},${TRIMMED_REF_NAME}"
36+ OUTPUT_TAGS=(
37+ "type=raw,value=${TRIMMED_REF_NAME%.*}"
38+ "type=raw,value=${TRIMMED_REF_NAME}"
39+ )
4040
4141 # Check if this tag is the latest release by fetching the latest release and comparing the tag to the tag being built.
4242 LATEST_TAG="$(gh release view --json tagName -q .tagName)"
4343 if [ "$REF_NAME" = "$LATEST_TAG" ]; then
44- OUTPUT_TAGS="latest, ${OUTPUT_TAGS}"
44+ OUTPUT_TAGS=("type=raw,value=latest" " ${OUTPUT_TAGS[@]}")
4545 fi
4646
47- echo "OUTPUT_TAGS=${OUTPUT_TAGS}" >> "$GITHUB_OUTPUT" && cat "$GITHUB_OUTPUT"
47+ {
48+ echo "OUTPUT_TAGS<<EOF"
49+ printf '%s\n' "${OUTPUT_TAGS[@]}"
50+ echo "EOF"
51+ } >> "$GITHUB_OUTPUT"
52+ cat "$GITHUB_OUTPUT"
4853 env :
4954 REF_NAME : ${{ github.ref_name }}
5055 GH_TOKEN : ${{ github.token }}
Original file line number Diff line number Diff line change @@ -182,7 +182,7 @@ jobs:
182182 fi
183183
184184 echo "digest=${DIGEST}" >> $GITHUB_OUTPUT
185- echo "image-name=ghcr.io/${BASE_REPO}" >> $GITHUB_OUTPUT
185+ echo "image-name=ghcr.io/${BASE_REPO}" >> $GITHUB_OUTPUT
186186 - name : Attest build provenance
187187 if : ${{ (github.event_name == 'push' && startsWith(github.ref, 'refs/tags/')) || github.event_name == 'workflow_dispatch' }}
188188 uses : actions/attest-build-provenance@ef244123eb79f2f7a7e75d99086184180e6d0018 # v2.0.0
You can’t perform that action at this time.
0 commit comments