Skip to content

Commit 0bd4622

Browse files
committed
Enable cancel-in-progress for PR runs in all CI workflows
Update concurrency settings to cancel outdated workflow runs when new commits are pushed to a PR, while allowing branch builds to complete: - codestyle.yml - codeql.yml - groovy-joint-workflow.yml - rat.yml
1 parent c0446be commit 0bd4622

File tree

4 files changed

+4
-4
lines changed

4 files changed

+4
-4
lines changed

.github/workflows/codeql.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ on:
3737
# queue jobs and only allow 1 run per branch due to the likelihood of hitting GitHub resource limits
3838
concurrency:
3939
group: ${{ github.workflow }}-${{ github.ref }}
40-
cancel-in-progress: false
40+
cancel-in-progress: ${{ github.event_name == 'pull_request' }}
4141
jobs:
4242
analyze:
4343
name: Analyze

.github/workflows/codestyle.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ on:
2323
# queue jobs and only allow 1 run per branch due to the likelihood of hitting GitHub resource limits
2424
concurrency:
2525
group: ${{ github.workflow }}-${{ github.ref }}
26-
cancel-in-progress: false
26+
cancel-in-progress: ${{ github.event_name == 'pull_request' }}
2727
jobs:
2828
check_core_projects:
2929
name: "Core Projects"

.github/workflows/groovy-joint-workflow.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ on:
2525
# queue jobs and only allow 1 run per branch due to the likelihood of hitting GitHub resource limits
2626
concurrency:
2727
group: ${{ github.workflow }}-${{ github.ref }}
28-
cancel-in-progress: false
28+
cancel-in-progress: ${{ github.event_name == 'pull_request' }}
2929
permissions:
3030
contents: read
3131
jobs:

.github/workflows/rat.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ on:
2929
# queue jobs and only allow 1 run per branch due to the likelihood of hitting GitHub resource limits
3030
concurrency:
3131
group: ${{ github.workflow }}-${{ github.ref }}
32-
cancel-in-progress: false
32+
cancel-in-progress: ${{ github.event_name == 'pull_request' }}
3333
jobs:
3434
rat-audit:
3535
runs-on: ubuntu-latest

0 commit comments

Comments
 (0)