ci: use bake matrix subaction

Signed-off-by: CrazyMax <1951866+crazy-max@users.noreply.github.com>
This commit is contained in:
CrazyMax
2026-04-15 14:22:22 +02:00
parent 1743957d3f
commit 2437d5d646
2 changed files with 20 additions and 20 deletions

View File

@@ -65,18 +65,18 @@ jobs:
needs:
- validate-dco
outputs:
matrix: ${{ steps.platforms.outputs.matrix }}
includes: ${{ steps.gen.outputs.matrix }}
steps:
-
name: Checkout
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
-
name: Create matrix
id: platforms
run: |
matrix="$(docker buildx bake binary-cross --print | jq -cr '.target."binary-cross".platforms')"
echo "matrix=$matrix" >> $GITHUB_OUTPUT
echo "$matrix"
id: gen
uses: docker/bake-action/subaction/matrix@82490499d2e5613fcead7e128237ef0b0ea210f7 # v7.0.0
with:
target: binary-cross
fields: platforms
cross:
runs-on: ubuntu-24.04
@@ -88,12 +88,12 @@ jobs:
strategy:
fail-fast: false
matrix:
platform: ${{ fromJson(needs.prepare-cross.outputs.matrix) }}
include: ${{ fromJson(needs.prepare-cross.outputs.includes) }}
steps:
-
name: Prepare
env:
PLATFORM: ${{ matrix.platform }}
PLATFORM: ${{ matrix.platforms }}
run: |
echo "PLATFORM_PAIR=${PLATFORM//\//-}" >> $GITHUB_ENV
-
@@ -107,9 +107,9 @@ jobs:
name: Build
uses: docker/bake-action@82490499d2e5613fcead7e128237ef0b0ea210f7 # v7.0.0
with:
targets: all
targets: ${{ matrix.target }}
set: |
*.platform=${{ matrix.platform }}
*.platform=${{ matrix.platforms }}
-
name: List artifacts
run: |

View File

@@ -186,18 +186,18 @@ jobs:
needs:
- validate-dco
outputs:
matrix: ${{ steps.platforms.outputs.matrix }}
includes: ${{ steps.gen.outputs.matrix }}
steps:
-
name: Checkout
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
-
name: Create matrix
id: platforms
run: |
matrix="$(docker buildx bake binary-smoketest --print | jq -cr '.target."binary-smoketest".platforms')"
echo "matrix=$matrix" >> $GITHUB_OUTPUT
echo "$matrix"
id: gen
uses: docker/bake-action/subaction/matrix@82490499d2e5613fcead7e128237ef0b0ea210f7 # v7.0.0
with:
target: binary-smoketest
fields: platforms
smoke:
runs-on: ubuntu-24.04
@@ -208,12 +208,12 @@ jobs:
strategy:
fail-fast: false
matrix:
platform: ${{ fromJson(needs.smoke-prepare.outputs.matrix) }}
include: ${{ fromJson(needs.smoke-prepare.outputs.includes) }}
steps:
-
name: Prepare
env:
PLATFORM: ${{ matrix.platform }}
PLATFORM: ${{ matrix.platforms }}
run: |
echo "PLATFORM_PAIR=${PLATFORM//\//-}" >> $GITHUB_ENV
-
@@ -230,6 +230,6 @@ jobs:
name: Test
uses: docker/bake-action@82490499d2e5613fcead7e128237ef0b0ea210f7 # v7.0.0
with:
targets: binary-smoketest
targets: ${{ matrix.target }}
set: |
*.platform=${{ matrix.platform }}
*.platform=${{ matrix.platforms }}