Skip to content

Commit

Permalink
Add CI concurrency group (#1304)
Browse files Browse the repository at this point in the history
### What

Add CI concurrency group limiting to one build per branch, including
main, canceling any older runs.


### Why

Limit CI resource usage, especially of mac and windows instances. We
never need out-of-date commit CI runs to complete on PRs.
  • Loading branch information
leighmcculloch authored Jul 29, 2024
1 parent d6f5639 commit 10a3372
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions .github/workflows/rust.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,10 @@ on:
pull_request:
merge_group:

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

defaults:
run:
shell: bash
Expand Down

0 comments on commit 10a3372

Please sign in to comment.