Skip to content

Commit 5fe9114

Browse files
authored
Update Luacheck workflow for Lua files
1 parent b209cc1 commit 5fe9114

1 file changed

Lines changed: 33 additions & 1 deletion

File tree

.github/workflows/laucheck.yml

Lines changed: 33 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,10 +5,42 @@ on:
55
branches:
66
- main
77
paths:
8+
- ".github/workflows/luacheck.yml"
89
- "**/*.lua"
10+
pull_request:
11+
paths:
912
- ".github/workflows/luacheck.yml"
13+
- "**/*.lua"
1014
workflow_dispatch:
1115

1216
jobs:
1317
luacheck:
14-
uses: BlueLua/bluelua.github.io/.github/workflows/luacheck.yml@main
18+
name: Luacheck
19+
runs-on: ubuntu-latest
20+
21+
steps:
22+
- name: Checkout
23+
uses: actions/checkout@v6
24+
25+
- name: Setup LuaJIT
26+
uses: leafo/gh-actions-lua@v13
27+
with:
28+
luaVersion: luajit
29+
30+
- name: Setup LuaRocks
31+
uses: leafo/gh-actions-luarocks@v6
32+
33+
- name: Install Luacheck
34+
run: luarocks install luacheck
35+
36+
- name: Resolve paths
37+
id: paths
38+
run: |
39+
if [ -d src ]; then
40+
echo "paths=src" >> "$GITHUB_OUTPUT"
41+
else
42+
echo "paths=lua" >> "$GITHUB_OUTPUT"
43+
fi
44+
45+
- name: Run Luacheck
46+
run: luacheck ${{ steps.paths.outputs.paths }}

0 commit comments

Comments
 (0)