From d1e187baf1abd0be2201b0838785ab951f1f76fe Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Rafa=C5=82=20Rzepecki?= Date: Fri, 4 Sep 2026 06:30:19 +0200 Subject: [PATCH] ci: Cancel in-progress workflow runs on branch push Add a `concurrency` block to the top-level configuration of the lint and test workflow. This groups runs by workflow and branch reference (`${{ github.workflow }}-${{ github.ref }}`) and enables automatic cancellation of active runs on any push (`cancel-in-progress: true`), while keeping the `main` branch protected from cancellation. Assisted-by: Gemini CLI:gemini-3.5-flash --- .github/workflows/ci.yml | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 80518cf..a1dc282 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -2,6 +2,10 @@ name: Lint and test on: push +concurrency: + group: ${{ github.workflow }}-${{ github.ref }} + cancel-in-progress: ${{ github.ref != 'refs/heads/main' }} + jobs: build-and-lint: runs-on: ubuntu-latest