Skip to content

Commit

Permalink
ci: split test and validate workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
crazy-max committed May 6, 2023
1 parent cffc4af commit 5baf15e
Show file tree
Hide file tree
Showing 2 changed files with 41 additions and 5 deletions.
5 changes: 0 additions & 5 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,11 +16,6 @@ jobs:
uses: actions/checkout@v3
with:
fetch-depth: 0
-
name: Validate
uses: docker/bake-action@v3
with:
targets: validate
-
name: Test
uses: docker/bake-action@v3
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@v3
with:
targets: ${{ matrix.target }}

0 comments on commit 5baf15e

Please sign in to comment.