Skip to content

Commit

Permalink
Use fkirc/skip-duplicate-actions action in workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
dolfinus committed Aug 24, 2021
1 parent b2ff588 commit 9ff08d1
Show file tree
Hide file tree
Showing 2 changed files with 21 additions and 0 deletions.
20 changes: 20 additions & 0 deletions .github/workflows/build.yml
Expand Up @@ -11,9 +11,28 @@ on:
- cron: "0 5 * * 6" # 5:00 UTC every Saturday

jobs:
check_duplicate_runs:
name: Check for duplicate runs
continue-on-error: true
runs-on: ubuntu-latest
outputs:
should_skip: ${{ steps.skip_check.outputs.should_skip }}
steps:
- id: skip_check
uses: fkirc/skip-duplicate-actions@master
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
concurrent_skipping: always
cancel_others: true
skip_after_successful_duplicate: false
paths_ignore: '["**/README.rst", "**/CHANGES.rst", "**/HACKING.rst", "**/LICENSE"]'
do_not_skip: '["pull_request"]'

build:
name: Python ${{ matrix.python-version }}
runs-on: ubuntu-latest
needs: check_duplicate_runs
if: ${{ needs.check_duplicate_runs.outputs.should_skip != 'true' }}

strategy:
matrix:
Expand Down Expand Up @@ -67,6 +86,7 @@ jobs:

lint:
name: ${{ matrix.toxenv }}
needs: check_duplicate_runs
runs-on: ubuntu-latest

strategy:
Expand Down
1 change: 1 addition & 0 deletions .gitignore
Expand Up @@ -14,3 +14,4 @@ __pycache__/
.cache
*.DS_Store
venv/
.vscode

0 comments on commit 9ff08d1

Please sign in to comment.