Skip to content

Commit 26be498

Browse files
committed
ci(action): Try without specifying a platform
Signed-off-by: Joas Schilling <[email protected]>
1 parent 141a397 commit 26be498

File tree

2 files changed

+19
-5
lines changed

2 files changed

+19
-5
lines changed

.github/workflows/build-test.yml

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -69,13 +69,15 @@ jobs:
6969
IMAGE=$(dirname ${{ matrix.dockerfile }})
7070
cd "$(dirname ${{ matrix.dockerfile }})"
7171
case "$IMAGE" in
72+
android*)
73+
PLATFORM="" ;;
7274
client*)
73-
PLATFORM="linux/amd64" ;;
75+
PLATFORM="--platform 'linux/amd64'" ;;
7476
translations*)
75-
PLATFORM="linux/amd64" ;;
77+
PLATFORM="--platform 'linux/amd64'" ;;
7678
*32bit)
77-
PLATFORM="linux/386" ;;
79+
PLATFORM="--platform 'linux/386'" ;;
7880
*)
79-
PLATFORM="linux/amd64,linux/arm64" ;;
81+
PLATFORM="--platform 'linux/amd64,linux/arm64'" ;;
8082
esac
81-
docker buildx build . --file Dockerfile
83+
docker buildx build $PLATFORM . --file Dockerfile

.github/workflows/docker.yml

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -66,6 +66,7 @@ jobs:
6666
password: ${{ secrets.GITHUB_TOKEN }}
6767

6868
- name: Build container image
69+
if: !startsWith(github.event.inputs.folderPath, 'android')
6970
uses: docker/build-push-action@263435318d21b8e681c14492fe198d362a7d2c83 # v6.18.0
7071
with:
7172
platforms: ${{ (startsWith(github.event.inputs.folderPath, 'client') || startsWith(github.event.inputs.folderPath, 'translations')) && 'linux/amd64' || (endsWith(github.event.inputs.folderPath, '32bit') && 'linux/386' || 'linux/amd64,linux/arm64') }}
@@ -74,3 +75,14 @@ jobs:
7475
file: '${{ github.event.inputs.folderPath }}/${{ github.event.inputs.dockerFile }}'
7576
tags: |
7677
ghcr.io/nextcloud/continuous-integration-${{ github.event.inputs.folderPath }}${{ github.event.inputs.suffix }}:${{ github.event.inputs.tagName }}
78+
79+
# Android needs without platform to be able to build with buildx
80+
- name: Build container image (Android)
81+
if: startsWith(github.event.inputs.folderPath, 'android')
82+
uses: docker/build-push-action@263435318d21b8e681c14492fe198d362a7d2c83 # v6.18.0
83+
with:
84+
push: true
85+
context: ${{ github.event.inputs.folderPath }}
86+
file: '${{ github.event.inputs.folderPath }}/${{ github.event.inputs.dockerFile }}'
87+
tags: |
88+
ghcr.io/nextcloud/continuous-integration-${{ github.event.inputs.folderPath }}${{ github.event.inputs.suffix }}:${{ github.event.inputs.tagName }}

0 commit comments

Comments
 (0)