Skip to content

Commit

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

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

### Why

Limit CI resource usage. We never need out-of-date commit CI runs to
complete on PRs. We do need to make sure that release vs pr builds vs
merge group build runs run to completion independently so that is
included in the identifier for the concurrency group.
  • Loading branch information
leighmcculloch authored Jul 24, 2024
1 parent 8809852 commit 00ddd27
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

jobs:

complete:
Expand Down

0 comments on commit 00ddd27

Please sign in to comment.