Skip to content

Commit c34dc96

Browse files
committed
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
1 parent 4e72497 commit c34dc96

1 file changed

Lines changed: 4 additions & 0 deletions

File tree

‎.github/workflows/ci.yml‎

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,10 @@ name: Lint and test
22

33
on: push
44

5+
concurrency:
6+
group: ${{ github.workflow }}-${{ github.ref }}
7+
cancel-in-progress: ${{ github.ref != 'refs/heads/main' }}
8+
59
jobs:
610
build-and-lint:
711
runs-on: ubuntu-latest

0 commit comments

Comments
 (0)