Skip to content

Warning

You're viewing an older version of this GitHub Action. Do you want to see the latest version instead?

StyLua

Actions
GitHub Action to run StyLua, an opinionated Lua code formatter
v1.1.2
Star (58)

StyLua GitHub Action stylua-action status

GitHub Action to run StyLua, a Lua code formatter.

Installs the StyLua binary (from GitHub releases), and caches it. Any StyLua command can then be run.

NOTE: We recommend using a toolchain manager such as aftman to manage StyLua, as it allows you to define the version used throughout your project - both on the command line, and in GitHub actions.

Usage

- uses: actions/checkout@v2
- uses: JohnnyMorganz/stylua-action@v1
  with:
    token: ${{ secrets.GITHUB_TOKEN }}
    version: latest # NOTE: we recommend pinning to a specific version in case of formatting changes
    # CLI arguments
    args: --check .

Parameters

token (Required)

GitHub token. Required since the binary is downloaded from GitHub releases (to speed download)

args (Required)

The arguments to pass to the StyLua binary

version (Optional)

The version of StyLua to use. Follows semver syntax. If not specified, installs the latest release. It is recommended to pin your version so that updates to StyLua don't lead to unwanted changes in the action without explicitly updating.

Based off https://github.com/Roblox/setup-foreman, licensed under MIT

StyLua is not certified by GitHub. It is provided by a third-party and is governed by separate terms of service, privacy policy, and support documentation.

About

GitHub Action to run StyLua, an opinionated Lua code formatter
v1.1.2

StyLua is not certified by GitHub. It is provided by a third-party and is governed by separate terms of service, privacy policy, and support documentation.