ci: new stylua action that only runs on push

remotes/origin/HEAD
Chris Grieser 2024-06-01 16:35:32 +02:00
parent d843c86cd0
commit 6c3a123dcd
2 changed files with 20 additions and 1 deletions

View File

@ -2,4 +2,3 @@
- [ ] Used only camelCase variable names.
- [ ] If functionality is added or modified, also made respective changes to the
`README.md` (the `.txt` file is auto-generated and does not need to be modified).
- [ ] If a non-trivial PR, formatting via `stylua`.

20
.github/workflows/stylua.yml vendored Normal file
View File

@ -0,0 +1,20 @@
name: Format with Stylua
on:
push:
branches: [ main ]
paths: [ '**.lua' ]
jobs:
postprocessing:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: JohnnyMorganz/stylua-action@v4
with:
token: ${{ secrets.GITHUB_TOKEN }}
version: latest
args: --check .
- uses: stefanzweifel/git-auto-commit-action@v4
with:
commit_message: "style: format with stylua"