25 lines
643 B
YAML
25 lines
643 B
YAML
---
|
|
# Check Lua Formatting
|
|
name: StyLua
|
|
|
|
on:
|
|
pull_request:
|
|
branches: [main]
|
|
push:
|
|
branches: [main]
|
|
|
|
jobs:
|
|
stylua:
|
|
runs-on: self-hosted
|
|
steps:
|
|
- name: Checkout
|
|
run: git clone --depth=1 $GITHUB_SERVER_URL/$GITHUB_REPOSITORY.git .
|
|
- name: Install StyLua
|
|
run: |
|
|
if ! command -v stylua &> /dev/null; then
|
|
curl -L -o stylua.zip "https://github.com/JohnnyMorganz/StyLua/releases/latest/download/stylua-$(uname -s)-$(uname -m).zip"
|
|
unzip stylua.zip -d /usr/local/bin
|
|
rm stylua.zip
|
|
fi
|
|
- name: Check Formatting
|
|
run: stylua --check .
|