--- # Check Lua Formatting name: StyLua on: pull_request: branches: [main] push: branches: [main] jobs: stylua: runs-on: self-hosted steps: - run: | if ! command -v stylua &> /dev/null; then curl -L -o /tmp/stylua.zip "https://github.com/JohnnyMorganz/StyLua/releases/latest/download/stylua-linux.zip" unzip /tmp/stylua.zip -d /tmp sudo mv /tmp/stylua /usr/local/bin/ rm /tmp/stylua.zip fi - run: git clone --depth=1 $GITHUB_SERVER_URL/$GITHUB_REPOSITORY.git repo - run: cd repo && stylua --check .