Skip to content

Commit 274d188

Browse files
authored
Merge pull request #189 from crazy-max/ci-split
ci: split validate workflow
2 parents bdfed9f + 305a38e commit 274d188

File tree

2 files changed

+21
-8
lines changed

2 files changed

+21
-8
lines changed

.github/workflows/ci.yml

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -8,9 +8,6 @@ on:
88
- 'dev'
99
- 'releases/v*'
1010
pull_request:
11-
branches:
12-
- 'dev'
13-
- 'releases/v*'
1411

1512
jobs:
1613
ci:
@@ -92,7 +89,6 @@ jobs:
9289
pages_threshold: major_outage
9390
-
9491
name: Deploy
95-
if: success()
9692
uses: ./
9793
with:
9894
target_branch: ${{ matrix.target_branch }}

.github/workflows/validate.yml

Lines changed: 21 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -8,15 +8,32 @@ on:
88
paths-ignore:
99
- '**.md'
1010
pull_request:
11-
branches:
12-
- 'dev'
13-
- 'releases/v*'
1411
paths-ignore:
1512
- '**.md'
1613

1714
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+
1829
validate:
1930
runs-on: ubuntu-latest
31+
needs:
32+
- prepare
33+
strategy:
34+
fail-fast: false
35+
matrix:
36+
target: ${{ fromJson(needs.prepare.outputs.targets) }}
2037
steps:
2138
-
2239
name: Checkout
@@ -25,4 +42,4 @@ jobs:
2542
name: Validate
2643
uses: docker/bake-action@v3
2744
with:
28-
targets: validate
45+
targets: ${{ matrix.target }}

0 commit comments

Comments
 (0)