Skip to content

Commit 3c011c6

Browse files
committed
workflows/premerge: Move concurrency definition to workflow level (llvm#126308)
Prior workflow runs were not being cancelled when the pull request was closed, and I think this was why. Also, there is no advantage to having the definitions at the job level. (cherry picked from commit 6e59888)
1 parent e2426cd commit 3c011c6

File tree

1 file changed

+4
-9
lines changed

1 file changed

+4
-9
lines changed

.github/workflows/premerge.yaml

Lines changed: 4 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -19,15 +19,16 @@ on:
1919
- 'main'
2020
- 'release/**'
2121

22+
concurrency:
23+
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.sha }}
24+
cancel-in-progress: true
25+
2226
jobs:
2327
premerge-checks-linux:
2428
if: >-
2529
false && github.repository_owner == 'llvm' &&
2630
(github.event_name != 'pull_request' || github.event.action != 'closed')
2731
runs-on: llvm-premerge-linux-runners
28-
concurrency:
29-
group: ${{ github.workflow }}-linux-${{ github.event.pull_request.number || github.sha }}
30-
cancel-in-progress: true
3132
steps:
3233
- name: Checkout LLVM
3334
uses: actions/checkout@v4
@@ -86,9 +87,6 @@ jobs:
8687
false && github.repository_owner == 'llvm' &&
8788
(github.event_name != 'pull_request' || github.event.action != 'closed')
8889
runs-on: llvm-premerge-windows-runners
89-
concurrency:
90-
group: ${{ github.workflow }}-windows-${{ github.event.pull_request.number || github.sha }}
91-
cancel-in-progress: true
9290
defaults:
9391
run:
9492
shell: bash
@@ -146,9 +144,6 @@ jobs:
146144
147145
permerge-check-macos:
148146
runs-on: macos-14
149-
concurrency:
150-
group: ${{ github.workflow }}-macos-${{ github.event.pull_request.number || github.sha }}
151-
cancel-in-progress: true
152147
if: >-
153148
github.repository_owner == 'llvm' &&
154149
(startswith(github.ref_name, 'release/') ||

0 commit comments

Comments
 (0)