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 Dec 16, 2021
1 parent b2ff588 commit 58c7275
Show file tree
Hide file tree
Showing 2 changed files with 22 additions and 0 deletions.
21 changes: 21 additions & 0 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
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: same_content
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,7 +86,9 @@ jobs:

lint:
name: ${{ matrix.toxenv }}
needs: check_duplicate_runs
runs-on: ubuntu-latest
if: ${{ needs.check_duplicate_runs.outputs.should_skip != 'true' }}

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

0 comments on commit 58c7275

Please sign in to comment.