Skip to content

Commit

Permalink
Update pre-commit.yml
Browse files Browse the repository at this point in the history
  • Loading branch information
thesujai authored Mar 28, 2024
1 parent 5975ff5 commit 15987e1
Showing 1 changed file with 17 additions and 14 deletions.
31 changes: 17 additions & 14 deletions .github/workflows/pre-commit.yml
Original file line number Diff line number Diff line change
@@ -1,24 +1,27 @@
name: Pre-commit CI
on:
pull_request:
push:
branches: [main, test-me-*]
pull_request:
types: [opened, synchronize, reopened, closed]
issue_comment:
types: [created]

jobs:
main:
name: "Pre-commit checks"
if: github.event_name == 'pull_request' || (github.event_name == 'issue_comment' && contains(github.event.comment.body, '/autofixme!'))
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/setup-python@v4
with:
python-version: 3.x
- name: Install pre-commit
run: pip install pre-commit
- uses: actions/checkout@v3
- uses: actions/setup-python@v4
with:
python-version: 3.x
- name: Install pre-commit
run: pip install pre-commit

- name: Run pre-commit
run: pre-commit run --all-files --show-diff-on-failure
- name: Run pre-commit
run: pre-commit run --all-files --show-diff-on-failure

- name: Run pre-commit-ci-lite
uses: pre-commit-ci/lite-action@v1.0.2
if: always()

- name: Run pre-commit-ci-lite
uses: pre-commit-ci/lite-action@v1.0.2
if: always()

0 comments on commit 15987e1

Please sign in to comment.