File tree Expand file tree Collapse file tree 1 file changed +28
-0
lines changed Expand file tree Collapse file tree 1 file changed +28
-0
lines changed Original file line number Diff line number Diff line change
1
+ name : Run pre-commit hooks
2
+
3
+ on :
4
+ push :
5
+ branches : [ "main" ]
6
+ pull_request :
7
+ branches : [ "main" ]
8
+
9
+ jobs :
10
+ pre-commit :
11
+ runs-on : ubuntu-latest
12
+ steps :
13
+ - uses : actions/checkout@v3
14
+ with :
15
+ fetch-depth : 0
16
+ - uses : actions/setup-python@v5
17
+ name : Install Python 3.12
18
+ with :
19
+ python-version : " 3.12"
20
+ cache : ' pip'
21
+ - run : pip install -U pip setuptools
22
+ - uses : pre-commit/action@v3.0.1
23
+ name : Configure and run pre-commit on changed files
24
+ with :
25
+ # the intention with this is to run pre-commit only
26
+ # on the diff submitted with this PR
27
+ extra_args : --color=always --from-ref ${{ github.event.pull_request.base.sha }} --to-ref ${{ github.event.pull_request.head.sha }}
28
+ permissions : read-all
You can’t perform that action at this time.
0 commit comments