Skip to content

Commit

Permalink
ci: split validate and test workflow
Browse files Browse the repository at this point in the history
Signed-off-by: CrazyMax <[email protected]>
  • Loading branch information
crazy-max committed Feb 21, 2023
1 parent 88220fa commit 3a46719
Show file tree
Hide file tree
Showing 2 changed files with 41 additions and 8 deletions.
8 changes: 0 additions & 8 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,6 @@ on:
- 'master'
- 'releases/v*'
pull_request:
branches:
- 'master'
- 'releases/v*'

jobs:
test:
Expand All @@ -17,11 +14,6 @@ jobs:
-
name: Checkout
uses: actions/checkout@v3
-
name: Validate
uses: docker/bake-action@v2
with:
targets: validate
-
name: Test
uses: docker/bake-action@v2
Expand Down
41 changes: 41 additions & 0 deletions .github/workflows/validate.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
name: validate

on:
push:
branches:
- 'master'
- 'releases/v*'
pull_request:

jobs:
prepare:
runs-on: ubuntu-latest
outputs:
targets: ${{ steps.targets.outputs.matrix }}
steps:
-
name: Checkout
uses: actions/checkout@v3
-
name: Targets matrix
id: targets
run: |
echo "matrix=$(docker buildx bake validate --print | jq -cr '.group.validate.targets')" >> $GITHUB_OUTPUT
validate:
runs-on: ubuntu-latest
needs:
- prepare
strategy:
fail-fast: false
matrix:
target: ${{ fromJson(needs.prepare.outputs.targets) }}
steps:
-
name: Checkout
uses: actions/checkout@v3
-
name: Validate
uses: docker/bake-action@v2
with:
targets: ${{ matrix.target }}

0 comments on commit 3a46719

Please sign in to comment.