Skip to content

Commit

Permalink
trivial: add CI job for pre-commit
Browse files Browse the repository at this point in the history
  • Loading branch information
superm1 committed Jan 17, 2024
1 parent 125c1fb commit d131d8d
Showing 1 changed file with 25 additions and 0 deletions.
25 changes: 25 additions & 0 deletions .github/workflows/pull-request-reviews.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
name: Pull Request reviews
on:
pull_request:
branches: [ main ]

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

jobs:
pre-commit:
runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Refresh dependencies
run: sudo apt update
- name: Install apt dependencies
run: sudo apt install shellcheck python3-pip -y
- name: Install pre-commit
run: pip install pre-commit
- name: Run pre-commit hooks
run: |
sed -i "/no-commit-to-branch/,+1d" .pre-commit-config.yaml
pre-commit run --hook-stage commit --all-files

0 comments on commit d131d8d

Please sign in to comment.