Skip to content

Commit

Permalink
Merge pull request #585 from BbolroC/fix-multiple-tags
Browse files Browse the repository at this point in the history
action: publish manifest for multiple tags
  • Loading branch information
imeoer authored Mar 19, 2024
2 parents 81119b8 + e707fd1 commit c7841c7
Showing 1 changed file with 14 additions and 6 deletions.
20 changes: 14 additions & 6 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -144,13 +144,16 @@ jobs:
echo "NYDUS_STABLE_VER=$NYDUS_STABLE_VER" >> "$GITHUB_ENV"
printf 'nydus version is: %s\n' "$NYDUS_STABLE_VER"
- name: build and push nydus-snapshotter image
uses: docker/build-push-action@v3
uses: docker/build-push-action@v5
with:
context: misc/snapshotter
file: misc/snapshotter/Dockerfile
push: true
platforms: ${{ matrix.build-os }}/${{ matrix.build-arch }}
tags: ${{ steps.meta.outputs.tags }}-${{ matrix.build-arch }}
provenance: false
tags: |
${{ fromJSON(steps.meta.outputs.json).tags[0] }}-${{ matrix.build-arch }}
${{ fromJSON(steps.meta.outputs.json).tags[1] }}-${{ matrix.build-arch }}
labels: ${{ steps.meta.outputs.labels }}
build-args: NYDUS_VER=${{ env.NYDUS_STABLE_VER }}

Expand All @@ -171,7 +174,12 @@ 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 }}
IFS=',' read -ra tags <<< "$(echo "${{ steps.meta.outputs.tags }}" | tr '\n' ',')"
for tag in "${tags[@]}"; do
docker manifest create "${tag}" \
--amend "${tag}-amd64" \
--amend "${tag}-arm64" \
--amend "${tag}-s390x" \
--amend "${tag}-ppc64le"
docker manifest push "${tag}"
done

0 comments on commit c7841c7

Please sign in to comment.