Skip to content

Commit 25f2aa6

Browse files
authored
Merge pull request #166 from crazy-max/ci-split
ci: split test and validate workflow
2 parents dd60c32 + d65d375 commit 25f2aa6

File tree

2 files changed

+41
-8
lines changed

2 files changed

+41
-8
lines changed

.github/workflows/test.yml

-8
Original file line numberDiff line numberDiff line change
@@ -6,9 +6,6 @@ on:
66
- 'master'
77
- 'releases/v*'
88
pull_request:
9-
branches:
10-
- 'master'
11-
- 'releases/v*'
129

1310
jobs:
1411
test:
@@ -17,11 +14,6 @@ jobs:
1714
-
1815
name: Checkout
1916
uses: actions/checkout@v3
20-
-
21-
name: Validate
22-
uses: docker/bake-action@v3
23-
with:
24-
targets: validate
2517
-
2618
name: Test
2719
uses: docker/bake-action@v3

.github/workflows/validate.yml

+41
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,41 @@
1+
name: validate
2+
3+
on:
4+
push:
5+
branches:
6+
- 'master'
7+
- 'releases/v*'
8+
pull_request:
9+
10+
jobs:
11+
prepare:
12+
runs-on: ubuntu-latest
13+
outputs:
14+
targets: ${{ steps.targets.outputs.matrix }}
15+
steps:
16+
-
17+
name: Checkout
18+
uses: actions/checkout@v3
19+
-
20+
name: Targets matrix
21+
id: targets
22+
run: |
23+
echo "matrix=$(docker buildx bake validate --print | jq -cr '.group.validate.targets')" >> $GITHUB_OUTPUT
24+
25+
validate:
26+
runs-on: ubuntu-latest
27+
needs:
28+
- prepare
29+
strategy:
30+
fail-fast: false
31+
matrix:
32+
target: ${{ fromJson(needs.prepare.outputs.targets) }}
33+
steps:
34+
-
35+
name: Checkout
36+
uses: actions/checkout@v3
37+
-
38+
name: Validate
39+
uses: docker/bake-action@v3
40+
with:
41+
targets: ${{ matrix.target }}

0 commit comments

Comments
 (0)