From fbc49242f4863706719a651d27bc869ba5496844 Mon Sep 17 00:00:00 2001 From: Evgeniy Podivilov Date: Tue, 21 Jul 2026 21:42:35 +0100 Subject: [PATCH] ci: cancel superseded pull-request runs Add a concurrency group keyed on workflow and ref. Cancellation is enabled only for pull_request events, where a new push makes the in-flight run's result obsolete and waiting for it just delays the check. Runs on push to main are never cancelled, so the branch always ends up with a fully verified state. --- .github/workflows/ci.yml | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 36604dc..171573f 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -6,6 +6,13 @@ on: push: branches: [main] +# Supersede in-flight runs for the same pull request: a new push makes the +# previous run's result obsolete, and letting it finish only delays feedback. +# On push to main every run must complete, so the branch always has a verified state. +concurrency: + group: ${{ github.workflow }}-${{ github.ref }} + cancel-in-progress: ${{ github.event_name == 'pull_request' }} + jobs: check: runs-on: ubuntu-latest