🚧 github: Use dynamic build matrix

test/github-actions
Gerber, Mike 2 years ago
parent 31fe37c36c
commit dfe6536e26

@ -15,6 +15,7 @@ jobs:
outputs: outputs:
core: ${{ steps.step1.outputs.core }} core: ${{ steps.step1.outputs.core }}
rest: ${{ steps.step1.outputs.rest }} rest: ${{ steps.step1.outputs.rest }}
all: ${{ steps.step1.outputs.all }}
steps: steps:
- -
name: Checkout name: Checkout
@ -25,6 +26,7 @@ jobs:
run: | run: |
echo "core=$(./.github/list-subimages --core --json)" >>$GITHUB_OUTPUT echo "core=$(./.github/list-subimages --core --json)" >>$GITHUB_OUTPUT
echo "rest=$(./.github/list-subimages --rest --json)" >>$GITHUB_OUTPUT echo "rest=$(./.github/list-subimages --rest --json)" >>$GITHUB_OUTPUT
echo "all=$(./.github/list-subimages --json)" >>$GITHUB_OUTPUT
build-core: build-core:
needs: matrix needs: matrix
@ -42,7 +44,7 @@ jobs:
needs: build-core needs: build-core
strategy: strategy:
matrix: matrix:
subimage: ["dinglehopper"] subimage: ${{ fromJson(needs.matrix.outputs.rest) }}
uses: ./.github/workflows/build-subimage.yml uses: ./.github/workflows/build-subimage.yml
with: with:
subimage: ${{ matrix.subimage }} subimage: ${{ matrix.subimage }}
@ -80,7 +82,7 @@ jobs:
needs: test needs: test
strategy: strategy:
matrix: matrix:
subimage: ["core", "dinglehopper"] subimage: ${{ fromJson(needs.matrix.outputs.all) }}
uses: ./.github/workflows/build-subimage.yml uses: ./.github/workflows/build-subimage.yml
with: with:
subimage: ${{ matrix.subimage }} subimage: ${{ matrix.subimage }}

Loading…
Cancel
Save