Skip to content

Commit b330c6c

Browse files
committed
.github: prevent duplicate builds when ci:main label is added to PRs
Add concurrency control to trigger workflow to cancel in-progress builds when new events (like adding ci:main label) occur on the same PR. This prevents resource waste from duplicate builds and handles the common workflow where developers add the ci:main label after PR creation. Fixes #1154
1 parent 64a3770 commit b330c6c

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

.github/workflows/trigger.yml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,10 @@ on:
99
- ci-work
1010
workflow_dispatch:
1111

12+
concurrency:
13+
group: ci-${{ github.event.pull_request.number || github.ref }}
14+
cancel-in-progress: true
15+
1216
jobs:
1317
build-x86_64:
1418
if: startsWith(github.repository, 'kernelkit/')

0 commit comments

Comments
 (0)