Skip to content

Commit

Permalink
action: publish docker manifest only for latest
Browse files Browse the repository at this point in the history
The PR containerd#584 overlooked a scenario involving more than two elements
in `steps.meta.outputs.tags`. This commit addresses that by iterating
over the tags and creating/pushing a manifest only for tags ending
with `latest`.

Fixes: containerd#583

Signed-off-by: Hyounggyu Choi <[email protected]>
  • Loading branch information
BbolroC committed Mar 18, 2024
1 parent 81119b8 commit 2ae8bf0
Showing 1 changed file with 8 additions and 4 deletions.
12 changes: 8 additions & 4 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -171,7 +171,11 @@ jobs:
images: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}
- name: Publish manifest for multi-arch image
run: |
docker manifest create ${{ steps.meta.outputs.tags }} \
--amend ${{ steps.meta.outputs.tags }}-amd64 --amend ${{ steps.meta.outputs.tags }}-arm64 \
--amend ${{ steps.meta.outputs.tags }}-s390x --amend ${{ steps.meta.outputs.tags }}-ppc64le
docker manifest push ${{ steps.meta.outputs.tags }}
for tag in $(echo "${{ steps.meta.outputs.tags }}" | tr ' ' '\n'); do
if [[ "${tag}" == *latest ]]; then
docker manifest create "${tag}" \
--amend "${tag}-amd64" --amend "${tag}-arm64" \
--amend "${tag}-s390x" --amend "${tag}-ppc64le"
docker manifest push "${tag}"
fi
done

0 comments on commit 2ae8bf0

Please sign in to comment.