Skip to content

Commit c69a2be

Browse files
committed
Cancel in-progress CodeQL workflows on new PR pushes
1 parent dd8a201 commit c69a2be

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

.github/workflows/codeql.yml

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,15 @@ on:
99
schedule:
1010
- cron: '34 11 * * 4'
1111

12+
# See https://github.com/hibernate/hibernate-orm/pull/4615 for a description of the behavior we're getting.
13+
concurrency:
14+
# Consider that two builds are in the same concurrency group (cannot run concurrently)
15+
# if they use the same workflow and are about the same branch ("ref") or pull request.
16+
group: "workflow = ${{ github.workflow }}, ref = ${{ github.event.ref }}, pr = ${{ github.event.pull_request.id }}"
17+
# Cancel previous builds in the same concurrency group even if they are in process
18+
# for pull requests or pushes to forks (not the upstream repository).
19+
cancel-in-progress: ${{ github.event_name == 'pull_request' || github.repository != 'hibernate/hibernate-orm' }}
20+
1221
jobs:
1322
analyze:
1423
name: Analyze

0 commit comments

Comments
 (0)