Skip to content

Commit

Permalink
workflow: add lua lint with stylua
Browse files Browse the repository at this point in the history
  • Loading branch information
Tanvir committed Aug 15, 2023
1 parent 4afbdde commit a0ec1c9
Show file tree
Hide file tree
Showing 2 changed files with 37 additions and 0 deletions.
16 changes: 16 additions & 0 deletions .github/workflows/lua-format-check-pr.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
name: Check Lint With Stylua
on:
pull_request:
paths:
- "**.lua"
jobs:
format_code:
if: github.repository != github.event.pull_request.base.repo.full_name # if not a local branch
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: JohnnyMorganz/stylua-action@v3
with:
token: ${{ secrets.GITHUB_TOKEN }}
version: latest
args: --check .
21 changes: 21 additions & 0 deletions .github/workflows/lua-format-push.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
name: Lint With Stylua
on:
push:
paths:
- "**.lua"
workflow_dispatch:
jobs:
format_code:
runs-on: ubuntu-latest
permissions:
contents: write
steps:
- uses: actions/checkout@v3
- uses: JohnnyMorganz/stylua-action@v3
with:
token: ${{ secrets.GITHUB_TOKEN }}
version: latest
args: .
- uses: stefanzweifel/git-auto-commit-action@v4
with:
commit_message: "chore: linting with Stylua"

0 comments on commit a0ec1c9

Please sign in to comment.