Skip to content

Commit d832f99

Browse files
committed
Cancel obsolete workflows only in PRs
1 parent f70a315 commit d832f99

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

.github/workflows/codeql-analysis.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,8 +16,8 @@ permissions:
1616
contents: read
1717

1818
concurrency:
19-
group: ${{ github.workflow }}-${{ github.event_name }}-${{ github.ref }}
20-
cancel-in-progress: true
19+
group: ${{ github.event_name }}-${{ github.workflow }}-${{ github.head_ref || github.ref }}
20+
cancel-in-progress: ${{ github.event_name == 'pull_request' }} # this will cancel only PRs
2121

2222
jobs:
2323
analyze:

0 commit comments

Comments
 (0)