Skip to content

Commit 7971b39

Browse files
author
tchapi
committed
Fix annotations in main build
1 parent 9552888 commit 7971b39

1 file changed

Lines changed: 9 additions & 11 deletions

File tree

.github/workflows/main.yml

Lines changed: 9 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -148,19 +148,17 @@ jobs:
148148

149149
- name: Create manifest list and push
150150
working-directory: /tmp/digests/${{ matrix.image }}/
151-
env:
152-
METADATA_JSON: ${{ steps.meta.outputs.json }}
153151
run: |
154-
# Build annotation flags from metadata
155-
ANNOTATIONS=$(echo "$METADATA_JSON" | jq -r '
156-
.labels | to_entries |
157-
map("--annotation index:\(.key)=\(.value)") |
158-
join(" ")
159-
')
160-
161152
docker buildx imagetools create \
162-
$(jq -cr '.tags | map("-t " + .) | join(" ")' <<< "$METADATA_JSON") \
163-
$ANNOTATIONS \
153+
$(jq -cr '.tags | map("-t " + .) | join(" ")' <<< "$DOCKER_METADATA_OUTPUT_JSON") \
154+
--annotation index:org.opencontainers.image.created="${{ fromJSON(steps.meta.outputs.json).labels['org.opencontainers.image.created'] }}" \
155+
--annotation index:org.opencontainers.image.description="${{ fromJSON(steps.meta.outputs.json).labels['org.opencontainers.image.description'] }}" \
156+
--annotation index:org.opencontainers.image.version="${{ fromJSON(steps.meta.outputs.json).labels['org.opencontainers.image.version'] }}" \
157+
--annotation index:org.opencontainers.image.licenses="${{ fromJSON(steps.meta.outputs.json).labels['org.opencontainers.image.licenses'] }}" \
158+
--annotation index:org.opencontainers.image.title="${{ fromJSON(steps.meta.outputs.json).labels['org.opencontainers.image.title'] }}" \
159+
--annotation index:org.opencontainers.image.source="${{ fromJSON(steps.meta.outputs.json).labels['org.opencontainers.image.source'] }}" \
160+
--annotation index:org.opencontainers.image.url="${{ fromJSON(steps.meta.outputs.json).labels['org.opencontainers.image.url'] }}" \
161+
--annotation index:org.opencontainers.image.revision="${{ fromJSON(steps.meta.outputs.json).labels['org.opencontainers.image.revision'] }}" \
164162
$(printf '${{ env.REGISTRY }}/${{ env.ACCOUNT }}/${{ matrix.image }}@sha256:%s ' *)
165163
166164
- name: Inspect image

0 commit comments

Comments
 (0)