Skip to content

Commit

Permalink
Merge pull request #173 from bedroge/fix_multiarch_images
Browse files Browse the repository at this point in the history
Fix issue with creating multi-platform Docker images
  • Loading branch information
ocaisa authored Jan 19, 2024
2 parents d6008db + 9dea35c commit 5bd42b2
Showing 1 changed file with 9 additions and 10 deletions.
19 changes: 9 additions & 10 deletions .github/workflows/build-publish-containers.yml
Original file line number Diff line number Diff line change
Expand Up @@ -82,8 +82,8 @@ jobs:
rm -rf /tmp/.buildx-cache
mv /tmp/.buildx-cache-new /tmp/.buildx-cache
create_manifest:
name: Create the Docker manifest
create_multiplatform_image:
name: Create the multi-platform Docker image
needs: build_and_publish
runs-on: ubuntu-latest
permissions:
Expand All @@ -105,15 +105,14 @@ jobs:
run: |
echo REPOSITORY_OWNER=$(echo ${{ github.repository_owner }} | tr '[:upper:]' '[:lower:]') >> $GITHUB_ENV
- name: Run docker manifest
- name: Create the final image using "docker buildx imagetools create"
if: github.event_name != 'pull_request'
run: |
docker manifest create \
ghcr.io/${{ env.REPOSITORY_OWNER }}/${{ matrix.tag }} \
--amend ghcr.io/${{ env.REPOSITORY_OWNER }}/${{ matrix.tag }}-amd64 \
--amend ghcr.io/${{ env.REPOSITORY_OWNER }}/${{ matrix.tag }}-arm64 \
--amend ghcr.io/${{ env.REPOSITORY_OWNER }}/${{ matrix.tag }}-ppc64le
docker buildx imagetools create -t ghcr.io/${{ env.REPOSITORY_OWNER }}/${{ matrix.tag }} \
ghcr.io/${{ env.REPOSITORY_OWNER }}/${{ matrix.tag }}-amd64 \
ghcr.io/${{ env.REPOSITORY_OWNER }}/${{ matrix.tag }}-arm64 \
ghcr.io/${{ env.REPOSITORY_OWNER }}/${{ matrix.tag }}-ppc64le
- name: Push manifest
- name: Inspect the final image
if: github.event_name != 'pull_request'
run: docker manifest push ghcr.io/${{ env.REPOSITORY_OWNER }}/${{ matrix.tag }}
run: docker buildx imagetools inspect ghcr.io/${{ env.REPOSITORY_OWNER }}/${{ matrix.tag }}

0 comments on commit 5bd42b2

Please sign in to comment.