Skip to content

Commit

Permalink
add workflow to run linting checks on a PR
Browse files Browse the repository at this point in the history
  • Loading branch information
thesujai committed Aug 4, 2024
1 parent d191c60 commit 4df5495
Showing 1 changed file with 33 additions and 0 deletions.
33 changes: 33 additions & 0 deletions .github/workflows/pre-commit.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
---
name: Linting

on:
push:
branches:
- main
pull_request:
branches:
- main

jobs:
pre_job:
name: Path match check
runs-on: ubuntu-latest
# Map a step output to a job output
outputs:
should_skip: ${{ steps.skip_check.outputs.should_skip }}
steps:
- id: skip_check
uses: fkirc/skip-duplicate-actions@master
with:
github_token: ${{ github.token }}
paths_ignore: '["**.po", "**.json"]'
linting:
name: All file linting
needs: pre_job
if: ${{ needs.pre_job.outputs.should_skip != 'true' }}
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v5
- uses: pre-commit/[email protected]

0 comments on commit 4df5495

Please sign in to comment.