From 2ee6f7435d64b2d92455889f6ccacd400b52fb5c Mon Sep 17 00:00:00 2001 From: Geza Lore Date: Sun, 20 Sep 2026 20:08:41 +0100 Subject: [PATCH] CI: Fix unlabeling closed PRs canceling unrelated jobs --- .github/workflows/coverage.yml | 6 +++++- .github/workflows/regression.yml | 6 +++++- .github/workflows/rtlmeter.yml | 6 +++++- 3 files changed, 15 insertions(+), 3 deletions(-) diff --git a/.github/workflows/coverage.yml b/.github/workflows/coverage.yml index 6cdf60449..cfe3db7d0 100644 --- a/.github/workflows/coverage.yml +++ b/.github/workflows/coverage.yml @@ -27,8 +27,12 @@ concurrency: # run, and any other label change has no effect. Note such an event still # creates a run of this workflow, which is skipped, and would then hide the # one in progress on the pull request. 'pr-run-cleanup.yml' deletes those. + # Key pull request runs on the number: 'github.ref' is the base branch once + # the pull request is closed, so unlabel events would cancel base runs. group: >- - ${{ github.workflow }}-${{ github.ref }}-${{ + ${{ github.workflow }}-${{ + github.event_name == 'pull_request' + && format('pr-{0}', github.event.number) || github.ref }}-${{ (github.event.action == 'labeled' || github.event.action == 'unlabeled') && github.event.label.name != 'pr: dev-coverage' && github.run_id || 'shared' }} diff --git a/.github/workflows/regression.yml b/.github/workflows/regression.yml index 2941e00af..eee530fa9 100644 --- a/.github/workflows/regression.yml +++ b/.github/workflows/regression.yml @@ -30,8 +30,12 @@ concurrency: # run, and any other label change has no effect. Note such an event still # creates a run of this workflow, which is skipped, and would then hide the # one in progress on the pull request. 'pr-run-cleanup.yml' deletes those. + # Key pull request runs on the number: 'github.ref' is the base branch once + # the pull request is closed, so unlabel events would cancel base runs. group: >- - ${{ github.workflow }}-${{ github.ref }}-${{ + ${{ github.workflow }}-${{ + github.event_name == 'pull_request' + && format('pr-{0}', github.event.number) || github.ref }}-${{ (github.event.action == 'labeled' || github.event.action == 'unlabeled') && github.event.label.name != 'pr: regression' && github.run_id || 'shared' }} diff --git a/.github/workflows/rtlmeter.yml b/.github/workflows/rtlmeter.yml index c0be3de49..3a49b2c0f 100644 --- a/.github/workflows/rtlmeter.yml +++ b/.github/workflows/rtlmeter.yml @@ -29,8 +29,12 @@ concurrency: # run, and any other label change has no effect. Note such an event still # creates a run of this workflow, which is skipped, and would then hide the # one in progress on the pull request. 'pr-run-cleanup.yml' deletes those. + # Key pull request runs on the number: 'github.ref' is the base branch once + # the pull request is closed, so unlabel events would cancel base runs. group: >- - ${{ github.workflow }}-${{ github.ref }}-${{ + ${{ github.workflow }}-${{ + github.event_name == 'pull_request' + && format('pr-{0}', github.event.number) || github.ref }}-${{ (github.event.action == 'labeled' || github.event.action == 'unlabeled') && github.event.label.name != 'pr: rtlmeter' && github.run_id || 'shared' }}