-
Notifications
You must be signed in to change notification settings - Fork 1
30 lines (29 loc) · 945 Bytes
/
stylua.yml
File metadata and controls
30 lines (29 loc) · 945 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
# copied from https://github.com/wbthomason/packer.nvim/blob/master/.github/workflows/formatting.yaml
name: StyLua
on:
push:
paths-ignore:
- '.github/**'
- '*.md'
branches: ['main']
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 lua/
- 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 ! [[ -z $(git status -s) ]]; then
git commit -m 'ci(stylua): format with stylua' lua/*
fi
- name: Push changes
uses: ad-m/github-push-action@master
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
branch: ${{ github.ref }}