Skip to content

Commit 6cd10ff

Browse files
committed
chore: try to prevent shell escaping
1 parent df910c3 commit 6cd10ff

1 file changed

Lines changed: 7 additions & 1 deletion

File tree

.github/workflows/wc-build-push.yml

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -126,9 +126,15 @@ jobs:
126126
working-directory: ${{ runner.temp }}/digests
127127
run: |
128128
set -Eeuo pipefail
129+
130+
annotations=$(echo '${{ steps.metadata.outputs.json }}' | jq -r '.annotations[]')
131+
for annotation in $annotations; do
132+
annotation_arguments+=(--annotation "$annotation")
133+
done
134+
129135
# shellcheck disable=SC2046
130136
docker buildx imagetools create \
131-
$(echo '${{ steps.metadata.outputs.json }}' | jq -r '.annotations | map("--annotation \"" + . + "\"") | join(" ")') \
137+
"${annotation_arguments[@]}" \
132138
$(echo '${{ steps.metadata.outputs.json }}' | jq -r '.tags | map("--tag " + .) | join(" ")') \
133139
$(printf '${{ env.REGISTRY }}/${{ github.repository }}-${{ inputs.flavor }}@sha256:%s ' *)
134140
- name: Inspect manifest and extract digest

0 commit comments

Comments
 (0)