File tree Expand file tree Collapse file tree 1 file changed +35
-0
lines changed
Expand file tree Collapse file tree 1 file changed +35
-0
lines changed Original file line number Diff line number Diff line change 1+ name : auto fix lint
2+
3+ on :
4+ pull_request :
5+ branches :
6+ - main
7+
8+
9+ jobs :
10+ fix-lint :
11+ if : github.actor != 'dependabot[bot]' && !github.event.pull_request.head.repo.fork
12+ runs-on : ubuntu-latest
13+ steps :
14+ - name : Checkout
15+ uses : actions/checkout@v6
16+ with :
17+ fetch-depth : 0
18+ ref : ${{ github.event.pull_request.head.ref }}
19+ token : ${{ secrets.GH_CLOUD_SDK_JS_ADMIN_WRITE_TOKEN }}
20+ - name : Setup Node
21+ uses : actions/setup-node@v6
22+ with :
23+ node-version : 20
24+ - name : Install dependencies
25+ run : npm ci
26+ - run : npm run lint:fix
27+ - name : Commit Changes if needed
28+ run : |
29+ diff=`git diff`
30+ if [ ! -z "$diff" ]; then
31+ git config --global user.email "cloud-sdk-js@github.com"
32+ git config --global user.name "cloud-sdk-js"
33+ git commit -m "fix: Changes from lint" -a
34+ git push
35+ fi
You can’t perform that action at this time.
0 commit comments