mirror of
https://github.com/moby/moby.git
synced 2026-06-30 19:58:03 +00:00
ci: use bake matrix subaction
Signed-off-by: CrazyMax <1951866+crazy-max@users.noreply.github.com>
This commit is contained in:
20
.github/workflows/ci.yml
vendored
20
.github/workflows/ci.yml
vendored
@@ -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: |
|
||||
|
||||
20
.github/workflows/test.yml
vendored
20
.github/workflows/test.yml
vendored
@@ -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 }}
|
||||
|
||||
Reference in New Issue
Block a user