Skip to content

Commit 8eb972c

Browse files
committed
ci(validate): use bake
Signed-off-by: CrazyMax <[email protected]>
1 parent 0582a1a commit 8eb972c

File tree

1 file changed

+21
-8
lines changed

1 file changed

+21
-8
lines changed

.github/workflows/validate.yml

Lines changed: 21 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -20,16 +20,28 @@ env:
2020
SETUP_BUILDKIT_IMAGE: "moby/buildkit:latest"
2121

2222
jobs:
23+
prepare:
24+
runs-on: ubuntu-20.04
25+
outputs:
26+
targets: ${{ steps.targets.outputs.matrix }}
27+
steps:
28+
-
29+
name: Checkout
30+
uses: actions/checkout@v3
31+
-
32+
name: Matrix
33+
id: targets
34+
run: |
35+
echo "matrix=$(docker buildx bake validate --print | jq -cr '.group.validate.targets')" >> $GITHUB_OUTPUT
36+
2337
validate:
2438
runs-on: ubuntu-20.04
39+
needs:
40+
- prepare
2541
strategy:
2642
fail-fast: false
2743
matrix:
28-
include:
29-
- script: ./hack/lint
30-
- script: ./hack/validate-vendor
31-
- script: ./hack/validate-generated-files
32-
- script: ./hack/validate-shfmt
44+
target: ${{ fromJson(needs.prepare.outputs.targets) }}
3345
steps:
3446
-
3547
name: Checkout
@@ -42,6 +54,7 @@ jobs:
4254
driver-opts: image=${{ env.SETUP_BUILDKIT_IMAGE }}
4355
buildkitd-flags: --debug
4456
-
45-
name: Run
46-
run: |
47-
${{ matrix.script }}
57+
name: Validate
58+
uses: docker/bake-action@v2
59+
with:
60+
targets: ${{ matrix.target }}

0 commit comments

Comments
 (0)