Skip to content

Commit 65714f6

Browse files
committed
Generalize the concurrency group for main merges
This should ensure all merges to main run to completion while PRs will cancel previous jobs if new commits are pushed.
1 parent edd6dcd commit 65714f6

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

.github/workflows/pr.yaml

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,12 @@ on:
1010
- "main"
1111

1212
concurrency:
13-
group: ${{ github.workflow }}-${{ github.ref }}-${{ github.event_name }}
13+
group: >-
14+
${{
15+
(github.ref == 'refs/heads/main' &&
16+
format('{0}-{1}', github.workflow, github.run_id) ||
17+
format('{0}-{1}', github.workflow, github.ref)
18+
}}
1419
cancel-in-progress: true
1520

1621
jobs:

0 commit comments

Comments
 (0)