Skip to content

Commit 0a0a39f

Browse files
juli27davidstephengrant
authored andcommitted
ci: Use native concurrency property to cancel
This is recommended in the action repository README[^1] and in an issue[^2]. [^1]: https://github.com/styfle/cancel-workflow-action?tab=readme-ov-file [^2]: styfle/cancel-workflow-action#200 (comment)
1 parent 5777cfe commit 0a0a39f

File tree

8 files changed

+34
-36
lines changed

8 files changed

+34
-36
lines changed

.github/workflows/build_backend.yml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -41,15 +41,15 @@ on:
4141
type: string
4242
required: false
4343

44+
concurrency:
45+
group: ${{ github.workflow }}-${{ github.ref }}
46+
cancel-in-progress: true
47+
4448
jobs:
4549
backend:
4650
runs-on: ubuntu-22.04
4751
if: github.event_name != 'schedule' || github.repository == 'musescore/MuseScore'
4852
steps:
49-
- name: Cancel Previous Runs
50-
uses: styfle/cancel-workflow-action@0.13.1
51-
with:
52-
access_token: ${{ github.token }}
5353
- name: Clone repository
5454
uses: actions/checkout@v6
5555

.github/workflows/build_linux.yml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -48,6 +48,10 @@ on:
4848
type: string
4949
required: false
5050

51+
concurrency:
52+
group: ${{ github.workflow }}-${{ github.ref }}
53+
cancel-in-progress: true
54+
5155
jobs:
5256
build:
5357
if: github.event_name != 'workflow_dispatch' || contains(inputs.platforms, 'linux_x64') || contains(inputs.platforms, 'linux_arm64')
@@ -77,10 +81,6 @@ jobs:
7781
qt-arch: linux_gcc_arm64
7882
dump-symbols-arch: aarch64
7983
steps:
80-
- name: Cancel Previous Runs
81-
uses: styfle/cancel-workflow-action@0.13.1
82-
with:
83-
access_token: ${{ github.token }}
8484
- name: Clone repository
8585
uses: actions/checkout@v6
8686
- name: Configure workflow

.github/workflows/build_macos.yml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -39,17 +39,17 @@ on:
3939
type: string
4040
required: false
4141

42+
concurrency:
43+
group: ${{ github.workflow }}-${{ github.ref }}
44+
cancel-in-progress: true
45+
4246
env:
4347
DEVELOPER_DIR: /Applications/Xcode_26.2.app/Contents/Developer
4448

4549
jobs:
4650
macos_universal:
4751
runs-on: macos-26
4852
steps:
49-
- name: Cancel Previous Runs
50-
uses: styfle/cancel-workflow-action@0.13.1
51-
with:
52-
access_token: ${{ github.token }}
5353
- name: Clone repository
5454
uses: actions/checkout@v6
5555

.github/workflows/build_wasm.yml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -16,14 +16,14 @@ on:
1616
type: string
1717
required: true
1818

19+
concurrency:
20+
group: ${{ github.workflow }}-${{ github.ref }}
21+
cancel-in-progress: true
22+
1923
jobs:
2024
build:
2125
runs-on: ubuntu-24.04
2226
steps:
23-
- name: Cancel Previous Runs
24-
uses: styfle/cancel-workflow-action@0.13.1
25-
with:
26-
access_token: ${{ github.token }}
2727
- name: Clone repository
2828
uses: actions/checkout@v6
2929
- name: Configure workflow

.github/workflows/build_windows.yml

Lines changed: 6 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -52,11 +52,10 @@ jobs:
5252
windows_x64:
5353
if: github.event_name != 'workflow_dispatch' || contains(inputs.platforms, 'windows_x64')
5454
runs-on: windows-2025
55+
concurrency:
56+
group: ${{ github.workflow }}-${{ github.ref }}-native
57+
cancel-in-progress: true
5558
steps:
56-
- name: Cancel Previous Runs
57-
uses: styfle/cancel-workflow-action@0.13.1
58-
with:
59-
access_token: ${{ github.token }}
6059
- name: Clone repository
6160
uses: actions/checkout@v6
6261
- name: Configure workflow
@@ -246,11 +245,10 @@ jobs:
246245
github.event_name != 'pull_request' &&
247246
(github.event_name != 'workflow_dispatch' || contains(inputs.platforms, 'windows_portable'))
248247
runs-on: windows-2025
248+
concurrency:
249+
group: ${{ github.workflow }}-${{ github.ref }}-portable
250+
cancel-in-progress: true
249251
steps:
250-
- name: Cancel Previous Runs
251-
uses: styfle/cancel-workflow-action@0.13.1
252-
with:
253-
access_token: ${{ github.token }}
254252
- name: Clone repository
255253
uses: actions/checkout@v6
256254
- name: Configure workflow

.github/workflows/build_without_qt.yml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4,14 +4,14 @@ on:
44
pull_request:
55
workflow_dispatch:
66

7+
concurrency:
8+
group: ${{ github.workflow }}-${{ github.ref }}
9+
cancel-in-progress: true
10+
711
jobs:
812
run_tests:
913
runs-on: ubuntu-22.04
1014
steps:
11-
- name: Cancel Previous Runs
12-
uses: styfle/cancel-workflow-action@0.13.1
13-
with:
14-
access_token: ${{ github.token }}
1515
- name: Clone repository
1616
uses: actions/checkout@v6
1717
- name: Setup environment

.github/workflows/check_unit_tests.yml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -12,14 +12,14 @@ on:
1212
schedule:
1313
- cron: "0 3 * * 4" # Every Thursday night at 03:00 for master branch
1414

15+
concurrency:
16+
group: ${{ github.workflow }}-${{ github.ref }}
17+
cancel-in-progress: true
18+
1519
jobs:
1620
run_tests:
1721
runs-on: ubuntu-22.04
1822
steps:
19-
- name: Cancel Previous Runs
20-
uses: styfle/cancel-workflow-action@0.13.1
21-
with:
22-
access_token: ${{ github.token }}
2323
- name: Clone repository
2424
uses: actions/checkout@v6
2525
- name: "Configure workflow"

.github/workflows/check_visual_tests.yml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,10 @@ on:
44
pull_request:
55
workflow_dispatch:
66

7+
concurrency:
8+
group: ${{ github.workflow }}-${{ github.ref }}
9+
cancel-in-progress: true
10+
711
jobs:
812
setup:
913
name: "Setup VTests workflow"
@@ -13,10 +17,6 @@ jobs:
1317
reference_ref: ${{ steps.output_data.outputs.reference_ref }}
1418
artifact_name: ${{ steps.output_data.outputs.artifact_name }}
1519
steps:
16-
- name: Cancel Previous Runs
17-
uses: styfle/cancel-workflow-action@0.13.1
18-
with:
19-
access_token: ${{ github.token }}
2020
- name: Clone repository
2121
uses: actions/checkout@v6
2222
with:

0 commit comments

Comments
 (0)