Skip to content

Commit

Permalink
Merge pull request #712 from nextcloud/exclude-client-container-from-…
Browse files Browse the repository at this point in the history
…multi-arch

Exclude client container from multi arch
  • Loading branch information
mgallien authored Jan 22, 2025
2 parents 1d3f701 + 2085fa9 commit e88ae62
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 2 deletions.
10 changes: 9 additions & 1 deletion .github/workflows/build-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,15 @@ jobs:
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@6524bf65af31da8d45b59e8c27de4bd072b392f5 # v3.8.0

- name: Build Docker image ${{ matrix.dockerfile }}
# Only build non-client containers as multi-arch containers
- name: Build multi-arch Docker image ${{ matrix.dockerfile }}
if: ${{ !startsWith(matrix.dockerfile, 'client') }}
run: |
cd "$(dirname ${{ matrix.dockerfile }})"
docker buildx build --platform linux/amd64,linux/arm64 . --file Dockerfile
- name: Build amd64 Docker image ${{ matrix.dockerfile }}
if: ${{ startsWith(matrix.dockerfile, 'client') }}
run: |
cd "$(dirname ${{ matrix.dockerfile }})"
docker build . --file Dockerfile
2 changes: 1 addition & 1 deletion .github/workflows/docker.yml
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ jobs:
- name: Build container image
uses: docker/build-push-action@b32b51a8eda65d6793cd0494a773d4f6bcef32dc # v6.11.0
with:
platforms: linux/amd64,linux/arm64
platforms: ${{ startsWith(github.event.inputs.folderPath, 'client') && 'linux/amd64' || 'linux/amd64,linux/arm64' }}
push: true
context: ${{ github.event.inputs.folderPath }}
file: '${{ github.event.inputs.folderPath }}/${{ github.event.inputs.dockerFile }}'
Expand Down

0 comments on commit e88ae62

Please sign in to comment.