This repository has been archived by the owner on Apr 16, 2024. It is now read-only.
Merge pull request #415 from edwintorok/doom-fixes #434
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: format | |
on: | |
push: | |
paths: "**.lua" | |
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 -g *.lua -g !doom_modules.lua -g !lua/colors/**/*.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 add *.lua colors/*.lua lua/ | |
git commit -m "chore: format source code" | |
fi | |
- name: Push formatted files | |
uses: ad-m/github-push-action@master | |
with: | |
github_token: ${{ secrets.GITHUB_TOKEN }} | |
branch: ${{ github.ref }} |