Skip to content

Commit 51b193c

Browse files
committed
Update lua-format.yml
1 parent d600b4d commit 51b193c

File tree

1 file changed

+7
-7
lines changed

1 file changed

+7
-7
lines changed

.github/workflows/lua-format.yml

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,28 +1,28 @@
11
---
22
name: Lua-format
3+
34
on:
45
pull_request:
56
paths:
67
- "data*/**"
7-
merge_group:
88
push:
99
paths:
1010
- "data*/**"
11+
1112
jobs:
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
@@ -32,7 +32,7 @@ jobs:
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

0 commit comments

Comments
 (0)