-
-
Notifications
You must be signed in to change notification settings - Fork 149
34 lines (31 loc) · 829 Bytes
/
format.yml
File metadata and controls
34 lines (31 loc) · 829 Bytes
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
name: format
on:
push:
branches: [main]
paths-ignore:
- ".github/**"
- "**.md"
permissions:
contents: write
pull-requests: write
jobs:
stylua:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Setup and run stylua
uses: JohnnyMorganz/stylua-action@v4
with:
token: ${{ secrets.GITHUB_TOKEN }}
version: v0.19.1
args: --config-path=stylua.toml .
- name: Commit changes
uses: stefanzweifel/git-auto-commit-action@v5
with:
commit_message: "chore: autoformat with stylua"
branch: ${{ github.ref }}
- name: Push formatted files
uses: ad-m/github-push-action@master
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
branch: ${{ github.ref }}