Skip to content

Allow manual format workflow #4

Allow manual format workflow

Allow manual format workflow #4

Workflow file for this run

name: Auto Format
on:
push:
branches:
- main
workflow_dispatch:
permissions:
contents: write
jobs:
format:
if: github.actor != 'github-actions[bot]'
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v6
with:
fetch-depth: 0
- uses: actions/setup-node@v6
with:
node-version: 20
cache: npm
- run: npm ci
- name: Prettier
run: npx --yes prettier --write "**/*.{md,json,yml,yaml,ts,mts}"
- name: Stylua
uses: JohnnyMorganz/stylua-action@v4
with:
version: latest
args: src spec types
token: ${{ secrets.GITHUB_TOKEN }}
- name: Commit changes
uses: stefanzweifel/git-auto-commit-action@v5
with:
commit_message: "chore: auto format"
branch: main
commit_user_name: github-actions[bot]
commit_user_email: 41898282+github-actions[bot]@users.noreply.github.com