Skip to content

Commit f40a95c

Browse files
committed
Use fkirc/skip-duplicate-actions action in workflow
1 parent b2ff588 commit f40a95c

2 files changed

Lines changed: 22 additions & 0 deletions

File tree

.github/workflows/build.yml

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,9 +11,28 @@ on:
1111
- cron: "0 5 * * 6" # 5:00 UTC every Saturday
1212

1313
jobs:
14+
check_duplicate_runs:
15+
name: Check for duplicate runs
16+
continue-on-error: true
17+
runs-on: ubuntu-latest
18+
outputs:
19+
should_skip: ${{ steps.skip_check.outputs.should_skip }}
20+
steps:
21+
- id: skip_check
22+
uses: fkirc/skip-duplicate-actions@master
23+
with:
24+
github_token: ${{ secrets.GITHUB_TOKEN }}
25+
concurrent_skipping: same_content
26+
cancel_others: true
27+
skip_after_successful_duplicate: false
28+
paths_ignore: '["**/README.rst", "**/CHANGES.rst", "**/HACKING.rst", "**/LICENSE"]'
29+
do_not_skip: '["pull_request"]'
30+
1431
build:
1532
name: Python ${{ matrix.python-version }}
1633
runs-on: ubuntu-latest
34+
needs: check_duplicate_runs
35+
if: ${{ needs.check_duplicate_runs.outputs.should_skip != 'true' }}
1736

1837
strategy:
1938
matrix:
@@ -67,7 +86,9 @@ jobs:
6786

6887
lint:
6988
name: ${{ matrix.toxenv }}
89+
needs: check_duplicate_runs
7090
runs-on: ubuntu-latest
91+
if: ${{ needs.check_duplicate_runs.outputs.should_skip != 'true' }}
7192

7293
strategy:
7394
matrix:

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,3 +14,4 @@ __pycache__/
1414
.cache
1515
*.DS_Store
1616
venv/
17+
.vscode

0 commit comments

Comments
 (0)