-
Notifications
You must be signed in to change notification settings - Fork 8
31 lines (30 loc) · 875 Bytes
/
format.yml
File metadata and controls
31 lines (30 loc) · 875 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
name: format
on:
workflow_dispatch:
push:
paths-ignore:
- ".github/**"
- "*.md"
- "*.txt"
branches: "**"
jobs:
stylua:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: JohnnyMorganz/stylua-action@1.0.0
with:
token: ${{ secrets.GITHUB_TOKEN }}
args: --config-path=./stylua.toml .
- name: Commit files
run: |
git config --local user.email "41898282+github-actions[bot]@users.noreply.github.com"
git config --local user.name "github-actions[bot]"
if [[ -n $(git status -s) ]]; then
git commit --all --message "chore: format with stylua"
fi
- name: Push changes
uses: ad-m/github-push-action@master
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
branch: ${{ github.ref }}