Skip to content

Commit e9a84ba

Browse files
committed
ci: split test and validate workflow
1 parent 2290dfe commit e9a84ba

File tree

2 files changed

+45
-5
lines changed

2 files changed

+45
-5
lines changed

.github/workflows/test.yml

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -17,11 +17,6 @@ jobs:
1717
-
1818
name: Checkout
1919
uses: actions/checkout@v4
20-
-
21-
name: Validate
22-
uses: docker/bake-action@v3
23-
with:
24-
targets: validate
2520
-
2621
name: Test
2722
uses: docker/bake-action@v3

.github/workflows/validate.yml

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

0 commit comments

Comments
 (0)