Skip to content

Commit 3c46acd

Browse files
committed
CI: cancel previous workflow runs when new commit is pushed
1 parent 087e7ec commit 3c46acd

File tree

2 files changed

+11
-0
lines changed

2 files changed

+11
-0
lines changed

.github/workflows/ci.yaml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,12 @@ on:
44
push:
55
branches:
66
- master
7+
8+
concurrency:
9+
# Cancel previous workflow run when a new commit is pushed to a feature branch
10+
group: ${{ github.workflow }}-${{ github.ref }}
11+
cancel-in-progress: ${{ github.ref != 'refs/heads/main' }}
12+
713
env:
814
PY_COLORS: 1
915

.github/workflows/lint.yml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,11 @@ on:
66
branches:
77
- master
88

9+
concurrency:
10+
# Cancel previous workflow run when a new commit is pushed to a feature branch
11+
group: ${{ github.workflow }}-${{ github.ref }}
12+
cancel-in-progress: ${{ github.ref != 'refs/heads/main' }}
13+
914
env:
1015
PYTHON_VERSION: 3.9
1116

0 commit comments

Comments
 (0)