Skip to content

Commit 3b233cb

Browse files
committed
fix(ci): use labels-list to generate annotations
1 parent 6b0d40b commit 3b233cb

1 file changed

Lines changed: 1 addition & 3 deletions

File tree

.github/workflows/build.yml

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -183,9 +183,7 @@ jobs:
183183
run: |
184184
# Create the manifest list and push to both registries
185185
docker buildx imagetools create $(jq -cr '.tags | map("-t " + .) | join(" ")' <<< "$DOCKER_METADATA_OUTPUT_JSON") \
186-
--annotation "index:org.opencontainers.image.description=${{ fromJSON(steps.docker_meta.outputs.json).labels['org.opencontainers.image.description'] }}" \
187-
--annotation "index:org.opencontainers.image.licenses=${{ fromJSON(steps.docker_meta.outputs.json).labels['org.opencontainers.image.licenses'] }}" \
188-
--annotation "index:org.opencontainers.image.source=${{ fromJSON(steps.docker_meta.outputs.json).labels['org.opencontainers.image.source'] }}" \
186+
$(jq -cr '.labels | to_entries | map("--annotation " + ("index:" + .key + "=" + .value | @sh)) | join(" ")' <<<"$DOCKER_METADATA_OUTPUT_JSON") \
189187
$(printf '${{ github.repository }}@sha256:%s ' *) \
190188
$(printf 'ghcr.io/${{ github.repository }}@sha256:%s ' *)
191189

0 commit comments

Comments
 (0)