Browse Source

feat: add stylua CI (wip)

my-config
NTBBloodbath 3 years ago
parent
commit
be61819d99
No known key found for this signature in database GPG Key ID: 18D6730BC846AAC5
  1. 29
      .github/workflows/format.yml

29
.github/workflows/format.yml

@ -0,0 +1,29 @@
name: format
on:
push:
branches: [main, develop]
jobs:
stylua:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Setup and run stylua
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 [[ ! -z $(git status -s) ]]; then
git add init.lua lua/
git commit -m "Format lua files"
fi
- name: Push formatted files
uses: ad-m/github-push-action@master
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
branch: ${{ github.ref }}
Loading…
Cancel
Save