Skip to content

Commit 4414d8c

Browse files
authored
[CI] Change to prek action workflows (#407)
1 parent 336791c commit 4414d8c

File tree

2 files changed

+34
-6
lines changed

2 files changed

+34
-6
lines changed
Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
# https://github.com/j178/prek
2+
name: Manual hooks
3+
4+
on: [pull_request]
5+
6+
permissions:
7+
contents: read
8+
9+
jobs:
10+
pre-commit:
11+
name: 🏃‍♂️‍➡️ prek on ${{ matrix.os }}
12+
runs-on: ${{ matrix.os }}
13+
strategy:
14+
matrix:
15+
os: [ubuntu-latest, windows-latest]
16+
steps:
17+
- name: "Checkout ${{ github.ref }} ( ${{ github.sha }} )"
18+
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
19+
with:
20+
persist-credentials: false
21+
- name: Run prek-action
22+
uses: j178/prek-action@53276d8b0d10f8b6672aa85b4588c6921d0370cc # v2.0.1
23+
with:
24+
install-only: true
25+
- name: Run manual prek hooks
26+
run: prek run --all-files --hook-stage manual

.github/workflows/pre-commit.yml

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,22 +1,24 @@
1-
name: pre-commit
1+
# https://github.com/j178/prek
2+
name: Standard hooks
3+
4+
on: [pull_request]
25

36
permissions:
47
contents: read
58

6-
on: [pull_request]
7-
89
jobs:
910
pre-commit:
10-
name: 🏃🏼 Pre-commit on ${{ matrix.os }}
11+
name: 🏃🏿‍♂️‍➡️ Run prek on ${{ matrix.os }}
1112
runs-on: ${{ matrix.os }}
1213
strategy:
1314
matrix:
1415
os: [ubuntu-latest, windows-latest]
1516
steps:
16-
- name: Checkout Code
17+
- name: "Checkout ${{ github.ref }} ( ${{ github.sha }} )"
1718
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
1819
with:
19-
fetch-depth: 0
2020
persist-credentials: false
2121
- name: Run prek-action
2222
uses: j178/prek-action@53276d8b0d10f8b6672aa85b4588c6921d0370cc # v2.0.1
23+
with:
24+
extra-args: --all-files

0 commit comments

Comments
 (0)