Skip to content

Commit 9b60ee7

Browse files
committed
fix(ci): attempt dynamic annotations
1 parent ed48cea commit 9b60ee7

1 file changed

Lines changed: 1 addition & 6 deletions

File tree

.github/workflows/build.yml

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -183,12 +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.created=${{ fromJSON(steps.docker_meta.outputs.json).labels['org.opencontainers.image.created'] }}" \
187-
--annotation "index:org.opencontainers.image.description=${{ fromJSON(steps.docker_meta.outputs.json).labels['org.opencontainers.image.description'] }}" \
188-
--annotation "index:org.opencontainers.image.licenses=${{ fromJSON(steps.docker_meta.outputs.json).labels['org.opencontainers.image.licenses'] }}" \
189-
--annotation "index:org.opencontainers.image.revision=${{ fromJSON(steps.docker_meta.outputs.json).labels['org.opencontainers.image.revision'] }}" \
190-
--annotation "index:org.opencontainers.image.source=${{ fromJSON(steps.docker_meta.outputs.json).labels['org.opencontainers.image.source'] }}" \
191-
--annotation "index:org.opencontainers.image.version=${{ fromJSON(steps.docker_meta.outputs.json).labels['org.opencontainers.image.version'] }}" \
186+
$(jq -cr '.labels | to_entries | map(select(.key != "org.opencontainers.image.url")) | map("--annotation " + ("index:" + .key + "=" + .value | @sh)) | join(" ")' <<<"$DOCKER_METADATA_OUTPUT_JSON") \
192187
$(printf '${{ github.repository }}@sha256:%s ' *) \
193188
$(printf 'ghcr.io/${{ github.repository }}@sha256:%s ' *)
194189

0 commit comments

Comments
 (0)