Skip to content

Commit

Permalink
ci(fix): skip job based on condition
Browse files Browse the repository at this point in the history
Allows required tests to pass
  • Loading branch information
nrdxp committed Sep 20, 2023
1 parent ed434ce commit fe5bdff
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
6 changes: 3 additions & 3 deletions .github/_ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,14 +24,14 @@ jobs:
steps:
- uses: nixbuild/nix-quick-install-action@v25
- uses: DeterminateSystems/magic-nix-cache-action@v2
- uses: divnix/std-action/discover@main
- uses: divnix/std-action/discover@proviso-skipped
id: discovery

packages: &job
needs: discover
name: ${{ matrix.target.jobName }}
runs-on: ubuntu-latest
if: fromJSON(needs.discover.outputs.hits).packages.build != ''
if: matrix.target.skipped == true
strategy:
matrix:
target: ${{ fromJSON(needs.discover.outputs.hits).packages.build }}
Expand All @@ -42,7 +42,7 @@ jobs:

shells:
<<: *job
if: fromJSON(needs.discover.outputs.hits).shells.build != ''
if: matrix.target.skipped == true
strategy:
matrix:
target: ${{ fromJSON(needs.discover.outputs.hits).shells.build }}
6 changes: 3 additions & 3 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,13 +20,13 @@ jobs:
steps:
- uses: nixbuild/nix-quick-install-action@v25
- uses: DeterminateSystems/magic-nix-cache-action@v2
- uses: divnix/std-action/discover@main
- uses: divnix/std-action/discover@proviso-skipped
id: discovery
packages:
needs: discover
name: ${{ matrix.target.jobName }}
runs-on: ubuntu-latest
if: fromJSON(needs.discover.outputs.hits).packages.build != ''
if: matrix.target.skipped == true
strategy:
matrix:
target: ${{ fromJSON(needs.discover.outputs.hits).packages.build }}
Expand All @@ -42,7 +42,7 @@ jobs:
- uses: nixbuild/nix-quick-install-action@v25
- uses: DeterminateSystems/magic-nix-cache-action@v2
- uses: divnix/std-action/run@main
if: fromJSON(needs.discover.outputs.hits).shells.build != ''
if: matrix.target.skipped == true
strategy:
matrix:
target: ${{ fromJSON(needs.discover.outputs.hits).shells.build }}

0 comments on commit fe5bdff

Please sign in to comment.