File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1+ name : Format files
2+
3+ on :
4+ push :
5+ branches : [ master ]
6+ pull_request :
7+ branches : [ master ]
8+ workflow_dispatch :
9+
10+ jobs :
11+ test-and-build :
12+ runs-on : ubuntu-latest
13+ steps :
14+ - uses : actions/checkout@v2
15+ with :
16+ persist-credentials : false
17+ fetch-depth : 0
18+
19+ - name : Install Prettier
20+ run : npm install --save-dev --save-exact prettier
21+
22+ - name : Format files
23+ run : prettier --write .
24+
25+ - name : Commit files
26+ run : |
27+ git config --local user.email "41898282+github-actions[bot]@users.noreply.github.com"
28+ git config --local user.name "github-actions[bot]"
29+ git add .
30+ git commit -m "代码重构 【Github Actions】"
31+
32+ - name : Push changes
33+ uses : ad-m/github-push-action@master
34+ with :
35+ github_token : ${{ secrets.GITHUB_TOKEN }}
36+ branch : ${{ github.ref }}
You can’t perform that action at this time.
0 commit comments