name: Stylua check

on:
    push:
        branches:
            - "main"
    pull_request:

jobs:
    stylua:
        runs-on: ubuntu-latest
        steps:
            - uses: actions/checkout@v4
            - name: Run Stylua check
              uses: JohnnyMorganz/stylua-action@v1.1.1
              with:
                  # token is needed because the action allegedly downloads binary from github releases
                  token: ${{ secrets.GITHUB_TOKEN }}
                  # CLI arguments
                  args: --check .
                  version: 0.20.0
