.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
This commit is contained in:
Joachim Wiberg
2025-09-30 10:21:09 +02:00
committed by Richard Alpe
parent 4750f96774
commit 6272c9c46c
+4
View File
@@ -9,6 +9,10 @@ on:
- ci-work
workflow_dispatch:
concurrency:
group: ci-${{ github.event.pull_request.number || github.ref }}
cancel-in-progress: true
jobs:
build-x86_64:
if: startsWith(github.repository, 'kernelkit/')