From a3dcad204f0eca0235aaf4665609f505a9eb33bc Mon Sep 17 00:00:00 2001 From: Jonas Dedden Date: Thu, 29 Feb 2024 22:58:30 +0100 Subject: [PATCH] Fix docker build --- .github/workflows/build-docker.yml | 25 ++++++++++++++++--------- 1 file changed, 16 insertions(+), 9 deletions(-) diff --git a/.github/workflows/build-docker.yml b/.github/workflows/build-docker.yml index 47e6ae3b..b6ba7869 100644 --- a/.github/workflows/build-docker.yml +++ b/.github/workflows/build-docker.yml @@ -19,15 +19,26 @@ jobs: build: runs-on: ubuntu-latest + strategy: + matrix: + platform: + - linux/amd64 + - linux/arm64 steps: - - name: Check Out Repo + - name: Prepare + run: | + if [ "${{ matrix.platform }}" = "linux/amd64" ]; then + echo "TARGET_ARCH=x86_64" >> $GITHUB_ENV + elif [ "${{ matrix.platform }}" = "linux/arm64" ]; then + echo "TARGET_ARCH=aarch64" >> $GITHUB_ENV + fi + - name: Checkout uses: actions/checkout@v4 - name: Set up QEMU uses: docker/setup-qemu-action@v3 - name: Set up Docker Buildx - id: buildx uses: docker/setup-buildx-action@v3 - name: Build @@ -36,12 +47,8 @@ jobs: with: context: ./ file: ./Dockerfile - platforms: linux/amd64,linux/arm64 - builder: ${{ steps.buildx.outputs.name }} push: false - tags: ghci.io/${{ github.repository }}-manylinux_2_28_${{ runner.arch }}:latest + platforms: ${{ matrix.platform }} + tags: ghci.io/${{ github.repository }}-manylinux_2_28_$TARGET_ARCH:latest build-args: | - TARGET_ARCH=${{ runner.arch }} - - - name: Image digest - run: echo ${{ steps.docker_build.outputs.digest }} + TARGET_ARCH=$TARGET_ARCH \ No newline at end of file