-
Notifications
You must be signed in to change notification settings - Fork 0
41 lines (34 loc) · 929 Bytes
/
pre-commit.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
---
name: Pre-Commit
on:
push:
pull_request:
branches: [ main ]
jobs:
Run-Hooks:
runs-on: macos-12
steps:
- name: Install preliminaries
run: |
brew install pre-commit jsonlint yamllint shellcheck
vagrant plugin install vagrant-disksize
shell: bash
- name: Checkout
uses: actions/checkout@v4
- id: file-changes
uses: trilom/[email protected]
with:
output: ' '
- name: Run pre-commit
run: |
pre-commit run --show-diff-on-failure\
--color=always\
--files ${{ steps.file-changes.outputs.files }}
shell: bash
- name: Show pre-commit logs
if: failure()
run: cat ~/.cache/pre-commit/pre-commit.log
shell: bash
- name: Show pre-commit version
run: pre-commit --version
shell: bash