.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-15 19:12:51 +02:00
parent 64a3770a76
commit b330c6c70d
+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/')