Skip to content

Commit 6e59888

Browse files
authored
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.
1 parent fb1216e commit 6e59888

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
@@ -21,15 +21,16 @@ on:
2121
- 'main'
2222
- 'release/**'
2323

24+
concurrency:
25+
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.sha }}
26+
cancel-in-progress: true
27+
2428
jobs:
2529
premerge-checks-linux:
2630
if: >-
2731
github.repository_owner == 'llvm' &&
2832
(github.event_name != 'pull_request' || github.event.action != 'closed')
2933
runs-on: llvm-premerge-linux-runners
30-
concurrency:
31-
group: ${{ github.workflow }}-linux-${{ github.event.pull_request.number || github.sha }}
32-
cancel-in-progress: true
3334
steps:
3435
- name: Checkout LLVM
3536
uses: actions/checkout@v4
@@ -88,9 +89,6 @@ jobs:
8889
github.repository_owner == 'llvm' &&
8990
(github.event_name != 'pull_request' || github.event.action != 'closed')
9091
runs-on: llvm-premerge-windows-runners
91-
concurrency:
92-
group: ${{ github.workflow }}-windows-${{ github.event.pull_request.number || github.sha }}
93-
cancel-in-progress: true
9492
defaults:
9593
run:
9694
shell: bash
@@ -148,9 +146,6 @@ jobs:
148146
149147
permerge-check-macos:
150148
runs-on: macos-14
151-
concurrency:
152-
group: ${{ github.workflow }}-macos-${{ github.event.pull_request.number || github.sha }}
153-
cancel-in-progress: true
154149
if: >-
155150
github.repository_owner == 'llvm' &&
156151
(startswith(github.ref_name, 'release/') ||

0 commit comments

Comments
 (0)