mirror of
https://github.com/DSpace/DSpace.git
synced 2025-10-07 10:04:21 +00:00
add support for multiple platforms to docker build
This commit is contained in:
10
.github/workflows/docker.yml
vendored
10
.github/workflows/docker.yml
vendored
@@ -41,6 +41,10 @@ jobs:
|
|||||||
- name: Setup Docker Buildx
|
- name: Setup Docker Buildx
|
||||||
uses: docker/setup-buildx-action@v1
|
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
|
# https://github.com/docker/login-action
|
||||||
- name: Login to DockerHub
|
- name: Login to DockerHub
|
||||||
# Only login if not a PR, as PRs only trigger a Docker build and not a push
|
# Only login if not a PR, as PRs only trigger a Docker build and not a push
|
||||||
@@ -70,6 +74,7 @@ jobs:
|
|||||||
with:
|
with:
|
||||||
context: .
|
context: .
|
||||||
file: ./Dockerfile.dependencies
|
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),
|
# 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
|
# but we ONLY do an image push to DockerHub if it's NOT a PR
|
||||||
push: ${{ github.event_name != 'pull_request' }}
|
push: ${{ github.event_name != 'pull_request' }}
|
||||||
@@ -95,6 +100,7 @@ jobs:
|
|||||||
with:
|
with:
|
||||||
context: .
|
context: .
|
||||||
file: ./Dockerfile
|
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),
|
# 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
|
# but we ONLY do an image push to DockerHub if it's NOT a PR
|
||||||
push: ${{ github.event_name != 'pull_request' }}
|
push: ${{ github.event_name != 'pull_request' }}
|
||||||
@@ -123,6 +129,7 @@ jobs:
|
|||||||
with:
|
with:
|
||||||
context: .
|
context: .
|
||||||
file: ./Dockerfile.test
|
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),
|
# 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
|
# but we ONLY do an image push to DockerHub if it's NOT a PR
|
||||||
push: ${{ github.event_name != 'pull_request' }}
|
push: ${{ github.event_name != 'pull_request' }}
|
||||||
@@ -148,9 +155,10 @@ jobs:
|
|||||||
with:
|
with:
|
||||||
context: .
|
context: .
|
||||||
file: ./Dockerfile.cli
|
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),
|
# 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
|
# but we ONLY do an image push to DockerHub if it's NOT a PR
|
||||||
push: ${{ github.event_name != 'pull_request' }}
|
push: ${{ github.event_name != 'pull_request' }}
|
||||||
# Use tags / labels provided by 'docker/metadata-action' above
|
# Use tags / labels provided by 'docker/metadata-action' above
|
||||||
tags: ${{ steps.meta_build_cli.outputs.tags }}
|
tags: ${{ steps.meta_build_cli.outputs.tags }}
|
||||||
labels: ${{ steps.meta_build_cli.outputs.labels }}
|
labels: ${{ steps.meta_build_cli.outputs.labels }}
|
||||||
|
Reference in New Issue
Block a user