Skip to content

Add formatting check to workflows. #7

Add formatting check to workflows.

Add formatting check to workflows. #7

Workflow file for this run

name: Check Formatting
on:
push:
branches:
- ep2025
pull_request:
jobs:
format-check:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
with:
token: ${{ secrets.COMMENT_TOKEN }}
- name: Set up pnpm
uses: pnpm/action-setup@v4
with:
run_install: false
- name: Set up Node.js
uses: actions/setup-node@v4
with:
node-version: 20
cache: "pnpm"
- name: Install dependencies
run: make install
- name: Check Formatting
id: format-check
run: pnpm format --check
continue-on-error: true
- name: Auto Format
if: steps.format-check.outcome == 'failure'
run: pnpm format
- name: Commit changes
if: steps.format-check.outcome == 'failure'
run: |
git config --local user.email "github-actions[bot]@users.noreply.github.com"
git config --local user.name "github-actions[bot]"
git add .
git commit -m "chore: auto-format code" -m "Automated code formatting."
git push