Skip to content

Commit 6e0d54f

Browse files
committed
Simplify pre-commit.yaml
1 parent 0eecaa6 commit 6e0d54f

1 file changed

Lines changed: 3 additions & 22 deletions

File tree

.github/workflows/pre-commit.yaml

Lines changed: 3 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -40,25 +40,6 @@ jobs:
4040
https://github.com/etiennebacher/jarl/releases/latest/download/jarl-installer.sh | sh
4141
echo "$HOME/.local/bin" >> "$GITHUB_PATH"
4242
43-
- name: Install pre-commit
44-
run: python -m pip install --upgrade pre-commit
45-
46-
- name: Run pre-commit (pull request)
47-
if: github.event_name == 'pull_request'
48-
run: |
49-
pre-commit run \
50-
--from-ref "${{ github.event.pull_request.base.sha }}" \
51-
--to-ref "${{ github.event.pull_request.head.sha }}" \
52-
--show-diff-on-failure
53-
54-
- name: Run pre-commit (push)
55-
if: github.event_name == 'push' && github.event.before != '0000000000000000000000000000000000000000'
56-
run: |
57-
pre-commit run \
58-
--from-ref "${{ github.event.before }}" \
59-
--to-ref "${{ github.sha }}" \
60-
--show-diff-on-failure
61-
62-
- name: Run pre-commit (bootstrap)
63-
if: github.event_name == 'push' && github.event.before == '0000000000000000000000000000000000000000'
64-
run: pre-commit run --all-files --show-diff-on-failure
43+
- uses: pre-commit/action@v3.0.1
44+
with:
45+
extra_args: --all-files --show-diff-on-failure

0 commit comments

Comments
 (0)