Skip to content

Commit

Permalink
ci: Add stylua check
Browse files Browse the repository at this point in the history
  • Loading branch information
isak102 committed Dec 30, 2024
1 parent ae18957 commit 65bd8c3
Showing 1 changed file with 25 additions and 0 deletions.
25 changes: 25 additions & 0 deletions .github/workflows/stylua.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
name: Lua Style Check

on:
push:
branches: [master]
pull_request:
branches: [master]

jobs:
stylua:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Set up Lua
uses: leafo/gh-actions-lua@v8
- name: Install Stylua
run: |
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')
echo "Latest download URL: $LATEST_URL"
curl -L $LATEST_URL -o stylua.zip
unzip stylua.zip
chmod +x stylua
- name: Run Stylua
run: |
./stylua --check .

0 comments on commit 65bd8c3

Please sign in to comment.