diff --git a/.github/workflows/nf-test-gpu.yml b/.github/workflows/nf-test-gpu.yml index 1eb05c0b..3be3cbcb 100644 --- a/.github/workflows/nf-test-gpu.yml +++ b/.github/workflows/nf-test-gpu.yml @@ -64,7 +64,13 @@ jobs: NXF_VER: ${{ matrix.NXF_VER }} # Only run on push if this is the nf-core dev branch (merged PRs) - if: "${{ github.event_name != 'push' || (github.event_name == 'push' && github.repository == 'nf-core/methylseq') }}" + # and number of shards is greater than 0 + if: | + needs.get-shards.outputs.total_shards > 0 && + ( + github.event_name != 'push' || + ( github.event_name == 'push' && github.repository == 'nf-core/methylseq' ) + ) strategy: fail-fast: false matrix: diff --git a/.github/workflows/nf-test.yml b/.github/workflows/nf-test.yml index bbc212f2..df9041dd 100644 --- a/.github/workflows/nf-test.yml +++ b/.github/workflows/nf-test.yml @@ -67,7 +67,13 @@ jobs: NXF_VER: ${{ matrix.NXF_VER }} # Only run on push if this is the nf-core dev branch (merged PRs) - if: "${{ github.event_name != 'push' || (github.event_name == 'push' && github.repository == 'nf-core/methylseq') }}" + # and number of shards is greater than 0 + if: | + needs.get-shards.outputs.total_shards > 0 && + ( + github.event_name != 'push' || + ( github.event_name == 'push' && github.repository == 'nf-core/methylseq' ) + ) strategy: fail-fast: false