Skip to content

Commit

Permalink
Update StyLuaGitHubAction.yml
Browse files Browse the repository at this point in the history
  • Loading branch information
bitpredator committed Jun 10, 2024
1 parent e904135 commit 30e43f7
Showing 1 changed file with 7 additions and 28 deletions.
35 changes: 7 additions & 28 deletions .github/workflows/StyLuaGitHubAction.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,31 +6,10 @@ on:
pull_request:
types: [ labeled ]

jobs:
formatter:
name: formatter
runs-on: ubuntu-latest
permissions:
contents: write
if: ${{ github.event_name == 'push' || (github.event_name == 'pull_request' && github.event.label.name == 'format_all') }}
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
steps:
- uses: actions/checkout@v3
with:
ref: ${{ github.head_ref }}
fetch-depth: 0
- uses: actions/setup-node@v3
with:
node-version: "16"
- name: Install stylua and format files
uses: JohnnyMorganz/stylua-action@v3
with:
token: ${{ secrets.GITHUB_TOKEN }}
version: v0.18.0
args: -- .
- name: Update repo before push
run: |
git pull
- name: Commit changes and push current branch
uses: stefanzweifel/git-auto-commit-action@v4
- uses: actions/checkout@v3
- uses: JohnnyMorganz/stylua-action@v3
with:
token: ${{ secrets.GITHUB_TOKEN }}
version: latest # NOTE: we recommend pinning to a specific version in case of formatting changes
# CLI arguments
args: --check .

0 comments on commit 30e43f7

Please sign in to comment.