Skip to content

Commit

Permalink
Fix docker build
Browse files Browse the repository at this point in the history
  • Loading branch information
Jonas Dedden committed Feb 29, 2024
1 parent 411f284 commit a3dcad2
Showing 1 changed file with 16 additions and 9 deletions.
25 changes: 16 additions & 9 deletions .github/workflows/build-docker.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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

0 comments on commit a3dcad2

Please sign in to comment.