Skip to content

Commit 374cbb4

Browse files
committed
use built in run cancellation
1 parent dd54b0b commit 374cbb4

File tree

4 files changed

+16
-21
lines changed

4 files changed

+16
-21
lines changed

.github/workflows/check-release.yml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,10 @@ on:
55
pull_request:
66
branches: ["*"]
77

8+
concurrency:
9+
group: check-release-${{ github.ref }}
10+
cancel-in-progress: true
11+
812
permissions:
913
contents: write
1014

.github/workflows/downstream.yml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,10 @@ on:
66
pull_request:
77
branches: "*"
88

9+
concurrency:
10+
group: downstream-${{ github.ref }}
11+
cancel-in-progress: true
12+
913
jobs:
1014
tests:
1115
runs-on: ubuntu-latest

.github/workflows/enforce-label.yml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,9 @@
11
name: Enforce PR label
22

3+
concurrency:
4+
group: label-${{ github.ref }}
5+
cancel-in-progress: true
6+
37
on:
48
pull_request:
59
types: [labeled, unlabeled, opened, edited, synchronize]

.github/workflows/main.yml

Lines changed: 4 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -4,30 +4,16 @@ on:
44
push:
55
pull_request:
66

7+
concurrency:
8+
group: ci-${{ github.ref }}
9+
cancel-in-progress: true
10+
711
jobs:
8-
check_duplicate_runs:
9-
name: Check for duplicate runs
10-
continue-on-error: true
11-
runs-on: ubuntu-latest
12-
outputs:
13-
should_skip: ${{ steps.skip_check.outputs.should_skip }}
14-
steps:
15-
- id: skip_check
16-
uses: fkirc/skip-duplicate-actions@master
17-
with:
18-
concurrent_skipping: always
19-
cancel_others: true
20-
skip_after_successful_duplicate: true
21-
paths_ignore: '["**/README.md", "**/CHANGELOG.md", "**/COPYING.md"]'
22-
do_not_skip: '["pull_request"]'
2312

2413
# Run "pre-commit run --all-files"
2514
pre-commit:
2615
name: Run pre-commit hook
2716

28-
needs: check_duplicate_runs
29-
if: ${{ needs.check_duplicate_runs.outputs.should_skip != 'true' }}
30-
3117
runs-on: ubuntu-latest
3218
timeout-minutes: 2
3319

@@ -60,9 +46,6 @@ jobs:
6046
build-n-test-n-coverage:
6147
name: Build, test and code coverage
6248

63-
needs: check_duplicate_runs
64-
if: ${{ needs.check_duplicate_runs.outputs.should_skip != 'true' }}
65-
6649
runs-on: ${{ matrix.os }}
6750

6851
strategy:

0 commit comments

Comments
 (0)