ci: matrix.include

This commit is contained in:
Matt Sturgeon 2025-05-25 23:41:30 +01:00
parent b147e6a6af
commit 2ce3bdd6f3
No known key found for this signature in database
GPG key ID: 4F91844CED1A8299
2 changed files with 6 additions and 7 deletions

View file

@ -22,7 +22,8 @@ jobs:
- ${{ matrix.runner }} - ${{ matrix.runner }}
strategy: strategy:
fail-fast: false fail-fast: false
matrix: ${{ fromJSON(inputs.builds) }} matrix:
include: ${{ fromJSON(inputs.builds) }}
timeout-minutes: ${{ inputs.timeout }} timeout-minutes: ${{ inputs.timeout }}
steps: steps:
- name: Free disk space - name: Free disk space

View file

@ -27,10 +27,7 @@ jobs:
id: set-matrix id: set-matrix
run: | run: |
set -Eeu set -Eeu
matrix=$( matrix=$(nix eval --json .#githubActions.matrix)
nix eval --json .#githubActions.matrix \
--apply 'map (m: m // { builds = builtins.toJSON m.builds; })'
)
echo "matrix=$matrix" >> "$GITHUB_OUTPUT" echo "matrix=$matrix" >> "$GITHUB_OUTPUT"
build: build:
@ -39,8 +36,9 @@ jobs:
- prepare - prepare
strategy: strategy:
fail-fast: false fail-fast: false
matrix: ${{ fromJSON(needs.prepare.outputs.matrix) }} matrix:
include: ${{ fromJSON(needs.prepare.outputs.matrix) }}
secrets: inherit secrets: inherit
with: with:
name: ${{ matrix.name }} name: ${{ matrix.name }}
builds: ${{ matrix.builds }} builds: ${{ toJSON(matrix.builds) }}