-
Notifications
You must be signed in to change notification settings - Fork 10
39 lines (33 loc) · 930 Bytes
/
lua.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
name: Lua lint and format
on:
push:
branches: [ "master" ]
paths:
- "lua/**"
pull_request:
branches: [ "master" ]
paths:
- "lua/**"
jobs:
lint-and-format:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Lint Lua
uses: lunarmodules/luacheck@v1
- name: Format Lua
if: github.event_name == 'push'
uses: JohnnyMorganz/stylua-action@v4
with:
token: ${{ secrets.GITHUB_TOKEN }}
version: latest
args: lua --color always
- name: Apply changes
if: github.event_name == 'push'
run: |
git config --global user.name "vyfor"
git config --global user.email "[email protected]"
git add -A
git commit -m "style(stylua): format Lua code" || echo "No changes to commit"
git push