Skip to content

Commit

Permalink
Cancel redundant CI jobs per ref name
Browse files Browse the repository at this point in the history
For non pull requests, we now cancel older CI jobs for the same name
instead of the same commit. This way pushing 4 commits two e.g. `main`
with a bit of time in between won't result in 4 CI pipelines, of which
the first 3 are redundant at that point.
  • Loading branch information
yorickpeterse committed Nov 15, 2023
1 parent f00a0d7 commit 8d3c6ef
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion .github/workflows/push.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ on:
pull_request:

concurrency:
group: ${{ github.workflow }}-${{ github.event_name == 'pull_request' && github.head_ref || github.sha }}
group: ${{ github.workflow }}-${{ github.event_name == 'pull_request' && github.head_ref || github.ref_name }}
cancel-in-progress: true

env:
Expand Down

0 comments on commit 8d3c6ef

Please sign in to comment.