Skip to content

Commit

Permalink
chore: use pre-job to skip duplicates
Browse files Browse the repository at this point in the history
  • Loading branch information
Olegt0rr committed Aug 27, 2023
1 parent 727a5df commit 6f6722e
Showing 1 changed file with 18 additions and 0 deletions.
18 changes: 18 additions & 0 deletions .github/workflows/linters.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,21 @@ on: [ push, pull_request ]

jobs:

pre_job:
runs-on: ubuntu-latest
outputs:
should_skip: ${{ steps.skip_check.outputs.should_skip }}
steps:
- id: skip_check
uses: fkirc/skip-duplicate-actions@v5
with:
skip_after_successful_duplicate: 'true'
do_not_skip: '["pull_request"]'


black:
needs: pre_job
if: needs.pre_job.outputs.should_skip != 'true'
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
Expand All @@ -13,6 +27,8 @@ jobs:
options: "--check --verbose"

ruff:
needs: pre_job
if: needs.pre_job.outputs.should_skip != 'true'
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
Expand All @@ -21,6 +37,8 @@ jobs:
src: './yatracker'

mypy:
needs: pre_job
if: needs.pre_job.outputs.should_skip != 'true'
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
Expand Down

0 comments on commit 6f6722e

Please sign in to comment.