add support for multiple platforms to docker build

This commit is contained in:
Art Lowel
2022-05-24 17:54:01 +02:00
parent 4e04dfd8d5
commit 2d0078c64e

View File

@@ -41,6 +41,10 @@ jobs:
- name: Setup Docker Buildx
uses: docker/setup-buildx-action@v1
# https://github.com/docker/setup-qemu-action
- name: Set up QEMU
uses: docker/setup-qemu-action@v2
# https://github.com/docker/login-action
- name: Login to DockerHub
# Only login if not a PR, as PRs only trigger a Docker build and not a push
@@ -70,6 +74,7 @@ jobs:
with:
context: .
file: ./Dockerfile.dependencies
platforms: linux/amd64,linux/arm/v7,linux/arm64
# For pull requests, we run the Docker build (to ensure no PR changes break the build),
# but we ONLY do an image push to DockerHub if it's NOT a PR
push: ${{ github.event_name != 'pull_request' }}
@@ -95,6 +100,7 @@ jobs:
with:
context: .
file: ./Dockerfile
platforms: linux/amd64,linux/arm/v7,linux/arm64
# For pull requests, we run the Docker build (to ensure no PR changes break the build),
# but we ONLY do an image push to DockerHub if it's NOT a PR
push: ${{ github.event_name != 'pull_request' }}
@@ -123,6 +129,7 @@ jobs:
with:
context: .
file: ./Dockerfile.test
platforms: linux/amd64,linux/arm/v7,linux/arm64
# For pull requests, we run the Docker build (to ensure no PR changes break the build),
# but we ONLY do an image push to DockerHub if it's NOT a PR
push: ${{ github.event_name != 'pull_request' }}
@@ -148,6 +155,7 @@ jobs:
with:
context: .
file: ./Dockerfile.cli
platforms: linux/amd64,linux/arm/v7,linux/arm64
# For pull requests, we run the Docker build (to ensure no PR changes break the build),
# but we ONLY do an image push to DockerHub if it's NOT a PR
push: ${{ github.event_name != 'pull_request' }}