From 1b54e630868fdf2edafd3650389cdf371fa571bb Mon Sep 17 00:00:00 2001 From: JSONbored <49853598+JSONbored@users.noreply.github.com> Date: Mon, 22 Jun 2026 01:38:36 -0700 Subject: [PATCH] ci: don't cancel in-progress main-branch push runs cancel-in-progress: true on group ci-${{ github.ref }} means back-to-back merges to main share one concurrency group and cancel each other during startup, producing startup_failure runs (e.g. merging two Renovate PRs ~5s apart left main's CI red despite valid workflows). Scope cancellation to pull_request events so every main merge gets a complete CI run while PR pushes still cancel superseded runs. --- .github/workflows/ci.yml | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 61722d495e..9326d322b2 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -11,7 +11,10 @@ permissions: concurrency: group: ci-${{ github.ref }} - cancel-in-progress: true + # Cancel only superseded PR runs (keep the newest). NEVER cancel main-branch push CI: + # back-to-back merges share group `ci-refs/heads/main`, and cancel-in-progress racing during + # startup turns those runs into `startup_failure` instead of giving each merge a complete run. + cancel-in-progress: ${{ github.event_name == 'pull_request' }} jobs: # Detect which areas a PR touches so the heavy jobs can skip when irrelevant.