Skip to content

Commit

Permalink
Fix CI for arm64
Browse files Browse the repository at this point in the history
  • Loading branch information
KubaZ2 committed Oct 10, 2024
1 parent da1d83c commit 78e5c9d
Showing 1 changed file with 19 additions and 17 deletions.
36 changes: 19 additions & 17 deletions .github/workflows/dotnet.yml
Original file line number Diff line number Diff line change
Expand Up @@ -59,13 +59,31 @@ jobs:
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3

- name: Build and push bot
uses: docker/bake-action@v5
with:
source: .
workdir: Bot
push: true
set: |
*.platform=linux/amd64,linux/arm64
*.cache-from=type=gha
*.cache-to=type=gha,mode=min
- name: Check if checked runtime changed
uses: dorny/paths-filter@v3
id: checkedruntime
with:
filters: |
checkedruntime:
- 'Backend/Sandbox/CheckedRuntime/**'
- '.github/workflows/**'
- name: Set MINUS_PREFIXED_PLATFORM_IF_NOT_AMD64
if: steps.checkedruntime.outputs.checkedruntime == 'true'
run: |
MINUS_PREFIXED_PLATFORM_IF_NOT_AMD64=${{ runner.arch != 'X64' && format('-{0}', runner.arch) || '' }}
echo "MINUS_PREFIXED_PLATFORM_IF_NOT_AMD64=${MINUS_PREFIXED_PLATFORM_IF_NOT_AMD64,,}" >>${GITHUB_ENV}
- name: Build and push checked runtime
if: steps.checkedruntime.outputs.checkedruntime == 'true'
Expand All @@ -78,22 +96,7 @@ jobs:
*.platform=linux/amd64,linux/arm64
*.cache-from=type=gha
*.cache-to=type=gha,mode=min
- name: Build and push bot
uses: docker/bake-action@v5
with:
source: .
workdir: Bot
push: true
set: |
*.platform=linux/amd64,linux/arm64
*.cache-from=type=gha
*.cache-to=type=gha,mode=min
- name: Set MINUS_PREFIXED_PLATFORM_IF_NOT_AMD64
run: |
MINUS_PREFIXED_PLATFORM_IF_NOT_AMD64=${{ runner.arch != 'X64' && format('-{0}', runner.arch) || '' }}
echo "MINUS_PREFIXED_PLATFORM_IF_NOT_AMD64=${MINUS_PREFIXED_PLATFORM_IF_NOT_AMD64,,}" >>${GITHUB_ENV}
checked-runtime.args.MINUS_PREFIXED_PLATFORM_IF_NOT_AMD64=${{ env.MINUS_PREFIXED_PLATFORM_IF_NOT_AMD64 }}
- name: Build and push backend
uses: docker/bake-action@v5
Expand All @@ -105,4 +108,3 @@ jobs:
*.platform=linux/amd64,linux/arm64
*.cache-from=type=gha
*.cache-to=type=gha,mode=min
asm.args.MINUS_PREFIXED_PLATFORM_IF_NOT_AMD64=${{ env.MINUS_PREFIXED_PLATFORM_IF_NOT_AMD64 }}

0 comments on commit 78e5c9d

Please sign in to comment.