From b330c6c70db7ff46a4ff3d341360d6150e6bebcd Mon Sep 17 00:00:00 2001 From: Joachim Wiberg Date: Mon, 15 Sep 2025 19:12:51 +0200 Subject: [PATCH] .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 --- .github/workflows/trigger.yml | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/.github/workflows/trigger.yml b/.github/workflows/trigger.yml index c0db755f..ed1f274d 100644 --- a/.github/workflows/trigger.yml +++ b/.github/workflows/trigger.yml @@ -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/')