-
Notifications
You must be signed in to change notification settings - Fork 12
42 lines (38 loc) · 1.12 KB
/
stylua.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
name: stylua
on:
push:
branches:
- 'main'
pull_request:
branches:
- 'main'
workflow_dispatch:
jobs:
style:
runs-on: ubuntu-24.04
permissions:
contents: write
steps:
- uses: actions/checkout@v3
- name: checkstylua
uses: JohnnyMorganz/stylua-action@v3
continue-on-error: true
with:
token: ${{ secrets.GITHUB_TOKEN }}
version: latest
args: --check .
- name: formatstylua
if: ${{ steps.checkstylua.outcome != 'success' }}
uses: JohnnyMorganz/stylua-action@v2
with:
token: ${{ secrets.GITHUB_TOKEN }}
version: latest
args: .
- uses: stefanzweifel/git-auto-commit-action@v4
if: ${{ steps.checkstylua.outcome != 'success' }}
with:
branch: ${{ github.head_ref }}
commit_message: "chore(stylua): format lua files"
commit_user_name: "github-actions[bot]"
commit_user_email: "github-actions[bot]@users.noreply.github.com"
commit_author: "github-actions[bot] <github-actions[bot]@users.noreply.github.com>"