Skip to content

Commit 58d7fc4

Browse files
authored
ci: Only cancel concurrent workflows on pull requests (#801)
We want ci to always run on all merges (to master). The cancellation is really just intended for pull requests, cutting old jobs short so we can start on the new ones immediately. The push events should always trigger and run.
1 parent a100243 commit 58d7fc4

File tree

8 files changed

+8
-8
lines changed

8 files changed

+8
-8
lines changed

.github/workflows/build_cmake_all.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ on:
4040

4141
concurrency:
4242
group: "${{ github.workflow }}-${{ github.ref || github.run_id }}"
43-
cancel-in-progress: true
43+
cancel-in-progress: ${{ github.event_name == 'pull_request' }}
4444

4545
env:
4646
CLANG_LATEST_VERSION: 20

.github/workflows/build_msbuild_all.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ on:
4747

4848
concurrency:
4949
group: "${{ github.workflow }}-${{ github.ref || github.run_id }}"
50-
cancel-in-progress: true
50+
cancel-in-progress: ${{ github.event_name == 'pull_request' }}
5151

5252
jobs:
5353
build:

.github/workflows/build_msbuild_client.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ on:
2626

2727
concurrency:
2828
group: "${{ github.workflow }}-${{ github.ref || github.run_id }}"
29-
cancel-in-progress: true
29+
cancel-in-progress: ${{ github.event_name == 'pull_request' }}
3030

3131
jobs:
3232
build:

.github/workflows/build_msbuild_client_tools.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ on:
2626

2727
concurrency:
2828
group: "${{ github.workflow }}-${{ github.ref || github.run_id }}"
29-
cancel-in-progress: true
29+
cancel-in-progress: ${{ github.event_name == 'pull_request' }}
3030

3131
# These should really be moved into the one solution.
3232
jobs:

.github/workflows/build_msbuild_server.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ on:
2626

2727
concurrency:
2828
group: "${{ github.workflow }}-${{ github.ref || github.run_id }}"
29-
cancel-in-progress: true
29+
cancel-in-progress: ${{ github.event_name == 'pull_request' }}
3030

3131
jobs:
3232
build:

.github/workflows/build_msbuild_tools.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ on:
2626

2727
concurrency:
2828
group: "${{ github.workflow }}-${{ github.ref || github.run_id }}"
29-
cancel-in-progress: true
29+
cancel-in-progress: ${{ github.event_name == 'pull_request' }}
3030

3131
jobs:
3232
build:

.github/workflows/clang-format-check.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ on:
2626

2727
concurrency:
2828
group: "${{ github.workflow }}-${{ github.ref || github.run_id }}"
29-
cancel-in-progress: true
29+
cancel-in-progress: ${{ github.event_name == 'pull_request' }}
3030

3131
jobs:
3232
formatting-check:

.github/workflows/clang-tidy-check.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ on:
3535

3636
concurrency:
3737
group: "${{ github.workflow }}-${{ github.ref || github.run_id }}"
38-
cancel-in-progress: true
38+
cancel-in-progress: ${{ github.event_name == 'pull_request' }}
3939

4040
jobs:
4141
lint_windows:

0 commit comments

Comments
 (0)