File tree 1 file changed +21
-6
lines changed
1 file changed +21
-6
lines changed Original file line number Diff line number Diff line change 1
1
name : Check Formatting
2
-
3
2
on :
4
3
push :
5
4
branches :
6
5
- ep2025
7
6
pull_request :
8
-
9
7
jobs :
10
8
format-check :
11
9
runs-on : ubuntu-latest
12
10
steps :
13
11
- name : Checkout
14
12
uses : actions/checkout@v4
15
-
13
+ with :
14
+ token : ${{ secrets.COMMENT_TOKEN }}
15
+
16
16
- name : Set up pnpm
17
17
uses : pnpm/action-setup@v4
18
18
with :
19
19
run_install : false
20
-
20
+
21
21
- name : Set up Node.js
22
22
uses : actions/setup-node@v4
23
23
with :
24
24
node-version : 20
25
25
cache : " pnpm"
26
-
26
+
27
27
- name : Install dependencies
28
28
run : make install
29
-
29
+
30
30
- name : Check Formatting
31
+ id : format-check
31
32
run : pnpm format --check
33
+ continue-on-error : true
34
+
35
+ - name : Auto Format
36
+ if : steps.format-check.outcome == 'failure'
37
+ run : pnpm format
38
+
39
+ - name : Commit changes
40
+ if : steps.format-check.outcome == 'failure'
41
+ run : |
42
+ git config --local user.email "github-actions[bot]@users.noreply.github.com"
43
+ git config --local user.name "github-actions[bot]"
44
+ git add .
45
+ git commit -m "chore: auto-format code" -m "Automated code formatting."
46
+ git push
You can’t perform that action at this time.
0 commit comments