From 5e01734c1e5b4c085a40f65c271c8774576e5eed Mon Sep 17 00:00:00 2001 From: CrazyMax Date: Sun, 26 Feb 2023 12:12:56 +0100 Subject: [PATCH 1/2] ci: build multi-platform image --- .github/workflows/build.yml | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 7a003e293..b2e037d3b 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -99,6 +99,9 @@ jobs: - name: Checkout repository uses: actions/checkout@v3 + - name: Set up QEMU + uses: docker/setup-qemu-action@v2 + - name: Set up Docker Buildx uses: docker/setup-buildx-action@v2 @@ -145,10 +148,16 @@ jobs: docker run --rm -i -v ${PWD}:/docs ${{ github.event.repository.full_name }}:${{ steps.meta.outputs.version }} new . docker run --rm -i -v ${PWD}:/docs ${{ github.event.repository.full_name }}:${{ steps.meta.outputs.version }} build + - name: Set platforms + if: github.event_name == 'release' + run: | + echo "PLATFORMS=linux/amd64,linux/arm64,linux/arm/v7" >> $GITHUB_ENV + - name: Publish Docker image uses: docker/build-push-action@v4 with: context: . + platforms: ${{ env.PLATFORMS }} push: ${{ github.event_name == 'release' }} tags: ${{ steps.meta.outputs.tags }} labels: ${{ steps.meta.outputs.labels }} From d4bda6f3deeda56ce175d640afc6b3b5def5dbba Mon Sep 17 00:00:00 2001 From: CrazyMax Date: Sun, 26 Feb 2023 12:25:51 +0100 Subject: [PATCH 2/2] ci: inspect and check manifest after publishing docker images --- .github/workflows/build.yml | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index b2e037d3b..fd28646aa 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -161,3 +161,14 @@ jobs: push: ${{ github.event_name == 'release' }} tags: ${{ steps.meta.outputs.tags }} labels: ${{ steps.meta.outputs.labels }} + + - name: Check manifest + if: github.event_name == 'release' + run: | + docker buildx imagetools inspect ${{ github.event.repository.full_name }}:${{ steps.meta.outputs.version }} + + - name: Inspect image + if: github.event_name == 'release' + run: | + docker pull ${{ github.event.repository.full_name }}:${{ steps.meta.outputs.version }} + docker image inspect ${{ github.event.repository.full_name }}:${{ steps.meta.outputs.version }}