Skip to content

Commit 5d9db10

Browse files
Cancel previous workflow runs
1 parent d6e2340 commit 5d9db10

File tree

2 files changed

+14
-0
lines changed

2 files changed

+14
-0
lines changed

.github/workflows/pypi.yml

+7
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,13 @@ on:
99
release:
1010
types: [published]
1111

12+
# Cancels all previous workflow runs for pull requests that have not completed.
13+
concurrency:
14+
# The concurrency group contains the workflow name and the branch name for pull requests
15+
# or the commit hash for any other events.
16+
group: ${{ github.workflow }}-${{ github.event_name == 'pull_request' && github.head_ref || github.sha }}
17+
cancel-in-progress: true
18+
1219
jobs:
1320
build:
1421
name: Build source distribution

.github/workflows/tests.yml

+7
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,13 @@ on:
88
branches:
99
- master
1010

11+
# Cancels all previous workflow runs for pull requests that have not completed.
12+
concurrency:
13+
# The concurrency group contains the workflow name and the branch name for pull requests
14+
# or the commit hash for any other events.
15+
group: ${{ github.workflow }}-${{ github.event_name == 'pull_request' && github.head_ref || github.sha }}
16+
cancel-in-progress: true
17+
1118
jobs:
1219
changes:
1320
name: "Check for changes"

0 commit comments

Comments
 (0)