Skip to content

Commit c2a2207

Browse files
committed
Annotate the image index so GHCR links the package to the repo
The release builds a multi-arch image, and GHCR reads org.opencontainers.image.source from the index manifest; the Dockerfile LABEL only lands in the per-arch image configs. Have metadata-action emit its labels and annotations at the manifest and index levels and pass both to build-push-action, as metallb-iad does. Assisted-By: LLM Signed-off-by: Timofei Larkin <lllamnyp@gmail.com>
1 parent 1fba66f commit c2a2207

1 file changed

Lines changed: 6 additions & 0 deletions

File tree

‎.github/workflows/release.yml‎

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,10 @@ jobs:
2929

3030
- id: meta
3131
uses: docker/metadata-action@v6
32+
env:
33+
# GHCR links a multi-arch package to its repo via the index
34+
# annotation; the Dockerfile LABEL only reaches the per-arch configs.
35+
DOCKER_METADATA_ANNOTATIONS_LEVELS: manifest,index
3236
with:
3337
images: ${{ env.IMAGE }}
3438
tags: |
@@ -43,6 +47,8 @@ jobs:
4347
context: .
4448
platforms: linux/amd64,linux/arm64
4549
tags: ${{ steps.meta.outputs.tags }}
50+
labels: ${{ steps.meta.outputs.labels }}
51+
annotations: ${{ steps.meta.outputs.annotations }}
4652
push: true
4753
cache-from: type=gha
4854
cache-to: type=gha,mode=max

0 commit comments

Comments
 (0)