name: Format Fix on: workflow_dispatch: permissions: contents: write jobs: prettier: runs-on: ubuntu-latest steps: - name: Check out repository uses: actions/checkout@v6 - name: Ensure the selected ref is a branch shell: bash run: | if [[ "${GITHUB_REF_TYPE}" != "branch" ]]; then echo "Format Fix must be run against a branch ref." exit 1 fi - name: Set up Bun uses: oven-sh/setup-bun@v2.2.0 with: bun-version: 1.3.11 - name: Install dependencies run: bun install --frozen-lockfile - name: Apply formatting run: bun run format - name: Commit formatting changes shell: bash run: | if git diff --quiet; then echo "No formatting changes to commit." exit 0 fi git config user.name "github-actions[bot]" git config user.email "41898282+github-actions[bot]@users.noreply.github.com" git add . git commit -m "chore: apply formatting" git push