File tree Expand file tree Collapse file tree 1 file changed +7
-7
lines changed
Expand file tree Collapse file tree 1 file changed +7
-7
lines changed Original file line number Diff line number Diff line change 11---
22name : Lua-format
3+
34on :
45 pull_request :
56 paths :
67 - " data*/**"
7- merge_group :
88 push :
99 paths :
1010 - " data*/**"
11+
1112jobs :
1213 lua-formatter :
1314 runs-on : ubuntu-latest
1415 steps :
1516 - name : Set up Git
16- if : ${{ github.ref != 'refs/heads/main ' }}
17+ if : ${{ github.event_name == 'push ' }}
1718 run : |
1819 git config --global user.email "github-actions[bot]@users.noreply.github.com"
1920 git config --global user.name "GitHub Actions"
20- - name : Actions checkout
21- if : ${{ github.ref != 'refs/heads/main' }}
21+
22+ - name : Checkout code
2223 uses : actions/checkout@v3
2324 with :
24- repository : ${{ github.event.pull_request.head.repo.full_name }}
25- ref : ${{ github.event.pull_request.head.ref }}
25+ ref : ${{ github.head_ref || github.ref_name }}
2626 token : ${{ secrets.GITHUB_TOKEN }}
2727
2828 - uses : JohnnyMorganz/stylua-action@v3
3232 args : .
3333
3434 - name : Run add and commit
35- if : ${{ github.ref != 'refs/heads/main ' }}
35+ if : ${{ github.event_name == 'push ' }}
3636 uses : EndBug/add-and-commit@v9
3737 with :
3838 author_name : GitHub Actions
You can’t perform that action at this time.
0 commit comments