Skip to content

Commit

Permalink
Dev workflow: add building for ARM platforms (#1096)
Browse files Browse the repository at this point in the history
* ci: add arm64 platform to build action for dev workflow

* ci: add step for multi-platform build

* ci: add new step for release

* feat: specify build platform on backend
  • Loading branch information
kdavis committed May 30, 2024
1 parent 48cd104 commit 75686ef
Show file tree
Hide file tree
Showing 3 changed files with 19 additions and 2 deletions.
9 changes: 9 additions & 0 deletions .github/workflows/dev.yml
Original file line number Diff line number Diff line change
Expand Up @@ -135,6 +135,15 @@ jobs:
run: |
echo "BUILD_NUMBER=$(($BUILD_NUMBER + 6000))" >> $GITHUB_ENV
- name: Publish - Build for Multi-Platforms
uses: docker/[email protected]
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/[email protected]
Expand Down
10 changes: 9 additions & 1 deletion .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -117,6 +116,15 @@ jobs:
run: docker-compose down
working-directory: tools/TestSuite

- name: Publish - Build for Multi-Platforms
uses: docker/[email protected]
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/[email protected]
Expand Down
2 changes: 1 addition & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down

0 comments on commit 75686ef

Please sign in to comment.