Skip to content

Commit 315eb2b

Browse files
committed
fix(btm-builder-image): drop job-level if:matrix expression (GHA can't evaluate it)
GHA evaluates job-level `if:` BEFORE matrix expansion, so `matrix.arch` isn't bound — the dispatch fails with HTTP 422: Unrecognized named-value: 'matrix' Located at: github.event_name == 'schedule' || contains(inputs.platforms, format('linux/{0}', matrix.arch)) Two ways to fix: dynamic-matrix via a setup job that emits the platform list (heavier), or just always build both arches (cheap). Picking the cheap one. The cost of an extra runner spin-up when only one arch was requested is ~30s; the filtering complexity isn't worth it. `inputs.platforms` is retained for documentation but no longer gates which jobs run.
1 parent 4047bf2 commit 315eb2b

1 file changed

Lines changed: 6 additions & 1 deletion

File tree

.github/workflows/btm-builder-image.yml

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,11 +49,16 @@ jobs:
4949
- arch: arm64
5050
runner: ubuntu-24.04-arm
5151
asset-key: arm64
52+
# Both arches always build. The `platforms:` input is retained
53+
# for documentation but doesn't gate matrix expansion — GHA's
54+
# job-level `if:` can't reference `matrix.*` (it's evaluated
55+
# before matrix bindings). The cost of building both when only
56+
# one was requested is small (~30s of runner startup) and the
57+
# filtering complexity isn't worth it.
5258
runs-on: ${{ matrix.runner }}
5359
permissions:
5460
contents: read
5561
packages: write
56-
if: ${{ github.event_name == 'schedule' || contains(inputs.platforms, format('linux/{0}', matrix.arch)) }}
5762
steps:
5863
- name: Checkout
5964
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2 (2026-05-15)

0 commit comments

Comments
 (0)