Skip to content

Commit

Permalink
updated pre-commit workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
BolunDai0216 committed Nov 3, 2024
1 parent 958b4cd commit e554502
Showing 1 changed file with 9 additions and 7 deletions.
16 changes: 9 additions & 7 deletions .github/workflows/pre-commit.yml
Original file line number Diff line number Diff line change
@@ -1,18 +1,20 @@
# https://pre-commit.com
# This GitHub Action assumes that the repo contains a valid .pre-commit-config.yaml file.
name: pre-commit
on: [pull_request, push]
name: Run pre-commit
on:
pull_request:
push:
branches: [main]

permissions:
contents: read
contents: read # to fetch code (actions/checkout)

jobs:
pre-commit:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/setup-python@v2
- run: pip install pre-commit
- uses: actions/checkout@v4
- uses: actions/setup-python@v5
- run: pipx install pre-commit
- run: pre-commit --version
- run: pre-commit install
- run: pre-commit run --all-files

0 comments on commit e554502

Please sign in to comment.