From 2642d0a3b1fff8995ce765dfce33b6ab31b00b5e Mon Sep 17 00:00:00 2001 From: Keir Date: Wed, 29 May 2024 11:41:40 +0100 Subject: [PATCH 1/4] ci: add arm64 platform to build action for dev workflow --- .github/workflows/dev.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/dev.yml b/.github/workflows/dev.yml index b62a6a8a3d..a64a352247 100644 --- a/.github/workflows/dev.yml +++ b/.github/workflows/dev.yml @@ -39,6 +39,7 @@ jobs: build-args: "SQUIDEX__RUNTIME__VERSION=7.0.0-dev-${{ env.BUILD_NUMBER }}" cache-from: type=gha cache-to: type=gha,mode=max + platforms: linux/amd64,linux/arm64 tags: squidex-local - name: Test - Start Compose From 543848c55218156542f332c04ac0a4c5cfdd50a3 Mon Sep 17 00:00:00 2001 From: Keir Date: Wed, 29 May 2024 12:04:51 +0100 Subject: [PATCH 2/4] ci: add step for multi-platform build --- .github/workflows/dev.yml | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/.github/workflows/dev.yml b/.github/workflows/dev.yml index a64a352247..548e0e6961 100644 --- a/.github/workflows/dev.yml +++ b/.github/workflows/dev.yml @@ -39,7 +39,6 @@ jobs: build-args: "SQUIDEX__RUNTIME__VERSION=7.0.0-dev-${{ env.BUILD_NUMBER }}" cache-from: type=gha cache-to: type=gha,mode=max - platforms: linux/amd64,linux/arm64 tags: squidex-local - name: Test - Start Compose @@ -136,6 +135,15 @@ jobs: run: | echo "BUILD_NUMBER=$(($BUILD_NUMBER + 6000))" >> $GITHUB_ENV + - name: Publish - Build for Multi-Platforms + uses: docker/build-push-action@v5.3.0 + with: + build-args: "SQUIDEX__RUNTIME__VERSION=7.0.0-dev-${{ env.BUILD_NUMBER }}" + cache-from: type=gha + cache-to: type=gha,mode=max + platforms: linux/amd64,linux/arm64 + tags: squidex-local + - name: Publish - Login to Docker Hub if: github.event_name != 'pull_request' uses: docker/login-action@v3.1.0 From b29772113b2d808962a5c5f04323465b77f606f4 Mon Sep 17 00:00:00 2001 From: Keir Date: Wed, 29 May 2024 12:06:57 +0100 Subject: [PATCH 3/4] ci: add new step for release --- .github/workflows/release.yml | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index d29f87e06e..e9db973185 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -34,7 +34,6 @@ jobs: build-args: "SQUIDEX__BUILD__VERSION=${{ env.GITHUB_REF_SLUG }},SQUIDEX__RUNTIME__VERSION=${{ env.GITHUB_REF_SLUG }}" cache-from: type=gha cache-to: type=gha,mode=max - platforms: linux/amd64,linux/arm64 tags: squidex-local - name: Test - Start Compose @@ -117,6 +116,15 @@ jobs: run: docker-compose down working-directory: tools/TestSuite + - name: Publish - Build for Multi-Platforms + uses: docker/build-push-action@v5.3.0 + with: + build-args: "SQUIDEX__BUILD__VERSION=${{ env.GITHUB_REF_SLUG }},SQUIDEX__RUNTIME__VERSION=${{ env.GITHUB_REF_SLUG }}" + cache-from: type=gha + cache-to: type=gha,mode=max + platforms: linux/amd64,linux/arm64 + tags: squidex-local + - name: Publish - Get Major Version id: version uses: rishabhgupta/split-by@v1.0.1 From 3ff0922ed91ae145fdded893c0c482593a22b393 Mon Sep 17 00:00:00 2001 From: Keir Date: Wed, 29 May 2024 13:37:10 +0100 Subject: [PATCH 4/4] feat: specify build platform on backend --- Dockerfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Dockerfile b/Dockerfile index 1fe474f1ee..c4cd6f8c44 100644 --- a/Dockerfile +++ b/Dockerfile @@ -2,7 +2,7 @@ # Stage 1, Build Backend # -FROM mcr.microsoft.com/dotnet/sdk:8.0 as backend +FROM --platform=$BUILDPLATFORM mcr.microsoft.com/dotnet/sdk:8.0 as backend ARG SQUIDEX__BUILD__VERSION=7.0.0