Skip to content

Commit

Permalink
ci: Only run pre-commit on diff instead of all files
Browse files Browse the repository at this point in the history
Signed-off-by: Russell Bryant <rbryant@redhat.com>
  • Loading branch information
russellb committed Oct 3, 2024
1 parent 5913320 commit 37a7a02
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions .github/workflows/pre-commit.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
name: Pre-commit

on: [push, pull_request]
on: [pull_request]

jobs:
pre-commit:
Expand All @@ -24,5 +24,8 @@ jobs:
python -m pip install --upgrade pip
pip install pre-commit
- name: git fetch
run: git fetch --all

- name: Run pre-commit
run: pre-commit run --all-files
run: pre-commit run --from-ref ${{ github.event.pull_request.base.sha }} --to-ref ${{ github.event.pull_request.head.sha }}

0 comments on commit 37a7a02

Please sign in to comment.