ci: only labelled macOS runs share a concurrency group (#1586)

A pull request event whose payload lacks the full-ci label, such as a push that arrives together
with the labelling, joined the pull request's group and cancelled the labelled run, while its own
job was skipped. The group now uses the same condition as the job's if:, so such events get a
group of their own.
This commit is contained in:
skylar taylor-barrick authored and GitHub committed 2026-11-25 03:48:57 -06:00
1 parent b430ab56ae
commit bc765549ce
1 file changed
+5 -3
+5 -3
View File
@@ -12,10 +12,12 @@ on:
permissions:
contents: read
# A newer push to a pull request branch cancels its older run. Adding any label but `full-ci` gets
# a group of its own, so it neither runs anything nor cancels a run.
# Only an event that will run the job (the same condition as its `if:`) joins the pull request's
# group, so a newer labelled push cancels an older one. Any other event, such as a push whose
# payload lacks the `full-ci` label or adding another label, gets a group of its own, so it
# neither runs anything nor cancels a labelled run.
concurrency:
group: macos-${{ (github.event.action != 'labeled' || github.event.label.name == 'full-ci') && github.ref || github.run_id }}
group: macos-${{ (contains(github.event.pull_request.labels.*.name, 'full-ci') && (github.event.action != 'labeled' || github.event.label.name == 'full-ci')) && github.ref || github.run_id }}
cancel-in-progress: true
jobs: