Skip to content

Commit 65bd8c3

Browse files
committed
ci: Add stylua check
1 parent ae18957 commit 65bd8c3

File tree

1 file changed

+25
-0
lines changed

1 file changed

+25
-0
lines changed

.github/workflows/stylua.yml

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
name: Lua Style Check
2+
3+
on:
4+
push:
5+
branches: [master]
6+
pull_request:
7+
branches: [master]
8+
9+
jobs:
10+
stylua:
11+
runs-on: ubuntu-latest
12+
steps:
13+
- uses: actions/checkout@v2
14+
- name: Set up Lua
15+
uses: leafo/gh-actions-lua@v8
16+
- name: Install Stylua
17+
run: |
18+
LATEST_URL=$(curl -s https://api.github.com/repos/JohnnyMorganz/StyLua/releases/latest | jq -r '.assets[] | select(.name | contains("linux-x86_64.zip")) | .browser_download_url')
19+
echo "Latest download URL: $LATEST_URL"
20+
curl -L $LATEST_URL -o stylua.zip
21+
unzip stylua.zip
22+
chmod +x stylua
23+
- name: Run Stylua
24+
run: |
25+
./stylua --check .

0 commit comments

Comments
 (0)