This repository was archived by the owner on May 3, 2025. It is now read-only.
File tree Expand file tree Collapse file tree 1 file changed +28
-16
lines changed
Expand file tree Collapse file tree 1 file changed +28
-16
lines changed Original file line number Diff line number Diff line change 11name : Format Code
22
33on :
4- pull_request :
5- branches :
6- - dev
4+ pull_request :
5+ branches :
6+ - dev
77
88jobs :
9- prettier-format :
10- runs-on : ubuntu-latest
9+ prettier-format :
10+ runs-on : ubuntu-latest
1111
12- steps :
13- - name : Checkout repository
14- uses : actions/checkout@v2
12+ steps :
13+ - name : Checkout repository
14+ uses : actions/checkout@v2
1515
16- - name : Set up Node.js
17- uses : actions/setup-node@v2
18- with :
19- node-version : ' 20'
16+ - name : Set up Node.js
17+ uses : actions/setup-node@v2
18+ with :
19+ node-version : ' 20'
2020
21- - name : Install dependencies
22- run : npm install
21+ - name : Install dependencies
22+ run : npm install
2323
24- - name : Run Prettier format
25- run : npm run format
24+ - name : Run Prettier format
25+ run : npm run format
26+
27+ - name : Commit changes
28+ run : |
29+ git config --global user.name 'github-actions[bot]'
30+ git config --global user.email 'github-actions[bot]@users.noreply.github.com'
31+ git add .
32+ if ! git diff-index --quiet HEAD; then
33+ git commit -m 'Format code with Prettier'
34+ git push
35+ fi
36+ env :
37+ GITHUB_TOKEN : ${{ secrets.GITHUB_TOKEN }}
You can’t perform that action at this time.
0 commit comments