Skip to content

Commit

Permalink
ci: Use arm64 runners where applicable
Browse files Browse the repository at this point in the history
  • Loading branch information
bjw-s authored Feb 18, 2025
1 parent 3105800 commit 2fb4a9e
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 8 deletions.
14 changes: 7 additions & 7 deletions .github/workflows/build-images.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,7 @@ jobs:
build-platform-images:
name: Build/Test ${{ matrix.image.name }} (${{ matrix.image.platform }})
needs: prepare
runs-on: ubuntu-latest
runs-on: ${{ matrix.image.platform == 'linux/arm64' && 'ubuntu-24.04-arm' || 'ubuntu-latest' }}
if: ${{ toJSON(fromJSON(needs.prepare.outputs.matrices).imagePlatforms) != '[]' && toJSON(fromJSON(needs.prepare.outputs.matrices).imagePlatforms) != '' }}
strategy:
fail-fast: false
Expand Down Expand Up @@ -164,7 +164,7 @@ jobs:

- name: Setup Goss
if: ${{ matrix.image.tests_enabled }}
uses: e1himself/goss-installation-action@v1
uses: mlipscombe/goss-installation-action@v1.2.2
with:
version: latest

Expand Down Expand Up @@ -247,7 +247,7 @@ jobs:
needs: ["prepare", "build-platform-images"]
# Always run merge, as the prior matrix is all or nothing. We test for prior step failure
# in the "Test Failed Bit" step. This ensures if one app fails, others can still complete.
if: ${{ always() && inputs.pushImages && toJSON(fromJSON(needs.prepare.outputs.matrices).images) != '[]' && toJSON(fromJSON(needs.prepare.outputs.matrices).images) != '' }}
if: ${{ !cancelled() && inputs.pushImages && toJSON(fromJSON(needs.prepare.outputs.matrices).images) != '[]' && toJSON(fromJSON(needs.prepare.outputs.matrices).images) != '' }}
strategy:
matrix:
image: ["${{ fromJSON(needs.prepare.outputs.matrices).images }}"]
Expand Down Expand Up @@ -315,23 +315,23 @@ jobs:
- name: Build successful
id: build-success
if: ${{ always() && steps.merge.outcome == 'success' && steps.inspect.outcome == 'success' }}
if: ${{ !cancelled() && steps.merge.outcome == 'success' && steps.inspect.outcome == 'success' }}
shell: bash
run: |
echo "message=🎉 ${{ matrix.image.name }} (${{ matrix.image.tags[0] }})" >> $GITHUB_OUTPUT
echo "color=0x00FF00" >> $GITHUB_OUTPUT
- name: Build failed
id: build-failed
if: ${{ always() && (steps.merge.outcome == 'failure' || steps.inspect.outcome == 'failure') }}
if: ${{ !cancelled() && (steps.merge.outcome == 'failure' || steps.inspect.outcome == 'failure') }}
shell: bash
run: |
echo "message=💥 ${{ matrix.image.name }} (${{ matrix.image.tags[0] }})" >> $GITHUB_OUTPUT
echo "color=0xFF0000" >> $GITHUB_OUTPUT
- name: Send Discord Webhook
uses: sarisia/actions-status-discord@v1
if: ${{ always() && inputs.sendNotifications == 'true' }}
if: ${{ !cancelled() && inputs.sendNotifications == 'true' }}
with:
webhook: ${{ secrets.DISCORD_WEBHOOK }}
title: ${{ steps.build-failed.outputs.message || steps.build-success.outputs.message }}
Expand All @@ -343,7 +343,7 @@ jobs:
name: Build matrix success
runs-on: ubuntu-latest
needs: ["prepare", "merge"]
if: ${{ always() }}
if: ${{ !cancelled() }}
steps:
- name: Check build matrix status
if: ${{ (inputs.appsToBuild != '' && inputs.appsToBuild != '[]') && (needs.merge.result != 'success' && needs.merge.result != 'skipped' && needs.prepare.result != 'success') }}
Expand Down
2 changes: 1 addition & 1 deletion scripts/prepare-matrices.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@

repo_owner = os.environ.get('REPO_OWNER', os.environ.get('GITHUB_REPOSITORY_OWNER'))

TESTABLE_PLATFORMS = ["linux/amd64"]
TESTABLE_PLATFORMS = ["linux/amd64", "linux/arm64"]

def load_metadata_file_yaml(file_path):
with open(file_path, "r") as f:
Expand Down

0 comments on commit 2fb4a9e

Please sign in to comment.