Skip to content

Commit

Permalink
Merge pull request #65 from paulsengroup/build-docker-arm64
Browse files Browse the repository at this point in the history
Build arm64 Docker images
  • Loading branch information
robomics authored Sep 27, 2023
2 parents eb609fb + 26e69bb commit 9a1551d
Showing 1 changed file with 15 additions and 0 deletions.
15 changes: 15 additions & 0 deletions .github/workflows/build-dockerfile.yml
Original file line number Diff line number Diff line change
Expand Up @@ -92,6 +92,12 @@ jobs:
VERSION="$GIT_TAG"
fi
if [[ ${{ github.event_name }} != 'pull_request' ]]; then
PLATFORMS='linux/amd64,linux/arm64'
else
PLATFORMS='linux/amd64'
fi
echo "C_COMPILER=$C_COMPILER" >> $GITHUB_OUTPUT
echo "CXX_COMPILER=$CXX_COMPILER" >> $GITHUB_OUTPUT
echo "FINAL_BASE_IMAGE=$FINAL_BASE_IMAGE" >> $GITHUB_OUTPUT
Expand All @@ -104,6 +110,7 @@ jobs:
echo "CREATION_DATE=$CREATION_DATE" >> $GITHUB_OUTPUT
echo "GIT_TAG=$GIT_TAG" >> $GITHUB_OUTPUT
echo "VERSION=$VERSION" >> $GITHUB_OUTPUT
echo "PLATFORMS=$PLATFORMS" >> $GITHUB_OUTPUT
- name: Docker meta
id: meta
Expand Down Expand Up @@ -134,6 +141,13 @@ jobs:

- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
with:
platforms: linux/amd64,linux/arm64

- name: Set up QEMU
uses: docker/setup-qemu-action@v3
with:
platforms: arm64

- name: Build Docker image and push to registries
uses: docker/build-push-action@v5
Expand All @@ -143,6 +157,7 @@ jobs:
cache-from: type=gha,scope=build-dockerfile
cache-to: type=gha,mode=min,scope=build-dockerfile
tags: ${{ steps.meta.outputs.tags }}
platforms: ${{ steps.build-args.outputs.PLATFORMS }}
build-args: |
C_COMPILER=${{ steps.build-args.outputs.C_COMPILER }}
CXX_COMPILER=${{ steps.build-args.outputs.CXX_COMPILER }}
Expand Down

0 comments on commit 9a1551d

Please sign in to comment.