File tree Expand file tree Collapse file tree 1 file changed +10
-23
lines changed Expand file tree Collapse file tree 1 file changed +10
-23
lines changed Original file line number Diff line number Diff line change 1
- name : Pre-commit hooks CI
1
+ name : Check pre-commit
2
+
2
3
on :
3
4
pull_request :
4
- types : [opened, edited, reopened, synchronize]
5
- push :
6
- branches : [ master ]
7
5
8
6
jobs :
9
- pre-commit :
7
+ check- pre-commit :
10
8
runs-on : ubuntu-latest
11
9
steps :
12
- - name : Checkout code
13
- uses : actions/checkout@v4
14
-
15
- - name : Set up Python
16
- uses : actions/setup-python@v4
17
- with :
18
- python-version : ' 3.9'
19
-
20
- - name : Install pre-commit
21
- run : pip install pre-commit
22
-
23
- - name : Run pre-commit on changed files
24
- if : github.event_name == 'pull_request'
25
- run : |
26
- git fetch origin ${{ github.base_ref }}
27
- git diff --name-only FETCH_HEAD $(git merge-base FETCH_HEAD ${{ github.base_ref }}) | xargs pre-commit run --files
28
- env :
29
- SKIP : " conventional-precommit-linter,eslint"
10
+ - uses : actions/checkout@v4
11
+ with :
12
+ fetch-depth : 0
13
+ - uses : actions/setup-python@v5
14
+ - uses : pre-commit/action@v3.0.1
15
+ env :
16
+ SKIP : " pip-compile,conventional-precommit-linter,eslint"
You can’t perform that action at this time.
0 commit comments