From c0a53a68939ded7277ebdf6cf5eaedea00be932d Mon Sep 17 00:00:00 2001 From: Amp Date: Sat, 14 Nov 2026 16:40:55 +0000 Subject: [PATCH] ci(swift): stop cancelling Swift (macOS) runs on main Five main runs in a row (e847b6d to 59c4205) were cancelled while still waiting for a runner, because each merge cancelled the run before it, so main had no finished Swift (macOS) run and the version pull request had nothing to gate on. Pull requests still cancel superseded runs; on main a started run finishes and GitHub keeps only the newest waiting one. Amp-Thread-ID: https://ampcode.com/threads/T-676d84e9-fb85-4087-aa34-c1b89aa8ad87 --- .github/workflows/swift-macos.yml | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/.github/workflows/swift-macos.yml b/.github/workflows/swift-macos.yml index 1bc134aa463..169ca13f47e 100644 --- a/.github/workflows/swift-macos.yml +++ b/.github/workflows/swift-macos.yml @@ -27,11 +27,12 @@ on: - '!**/*.md' - '.github/workflows/swift-macos.yml' -# A newer commit cancels the run of an older one on a branch and on main, where -# the newest run covers the commits before it. +# A newer commit cancels the run of an older one on a pull request. On main a +# started run finishes and only the newest waiting one is kept: runs wait +# hours for a runner, so cancelling there left main with no finished run. concurrency: group: '${{ github.workflow }} @ ${{ github.event.pull_request.head.label || github.head_ref || github.ref }}' - cancel-in-progress: ${{ github.event_name != 'workflow_dispatch' }} + cancel-in-progress: ${{ github.event_name == 'pull_request' }} permissions: contents: read