File tree Expand file tree Collapse file tree 1 file changed +7
-3
lines changed
Expand file tree Collapse file tree 1 file changed +7
-3
lines changed Original file line number Diff line number Diff line change 1111jobs :
1212 lua-formatter :
1313 runs-on : ubuntu-latest
14+ permissions :
15+ contents : write
16+ pull-requests : write
1417 steps :
1518 - name : Set up Git
1619 if : ${{ github.ref != 'refs/heads/main' }}
2124 if : ${{ github.ref != 'refs/heads/main' }}
2225 uses : actions/checkout@v3
2326 with :
24- repository : ${{ github.event.pull_request.head.repo.full_name }}
25- ref : ${{ github.event.pull_request.head.ref }}
27+ repository : ${{ github.event.pull_request.head.repo.full_name || github.repository }}
28+ ref : ${{ github.event.pull_request.head.ref || github.ref }}
2629 token : ${{ secrets.GITHUB_TOKEN }}
30+ fetch-depth : 0
2731
2832 - uses : JohnnyMorganz/stylua-action@v3
2933 with :
3236 args : .
3337
3438 - name : Run add and commit
35- if : ${{ github.ref != 'refs/heads/main' }}
39+ if : ${{ github.ref != 'refs/heads/main' && github.event_name == 'pull_request' }}
3640 uses : EndBug/add-and-commit@v9
3741 with :
3842 author_name : GitHub Actions
You can’t perform that action at this time.
0 commit comments