name: Format
on:
  pull_request:
    branches: [master]
jobs:
  format:
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v4
        with:
          ref: ${{ github.head_ref }}
      - uses: actions/setup-node@v4
        with:
          node-version: "22.x"
      - run: yarn install --frozen-lockfile
      - run: npm run format
      - name: commit changes
        uses: stefanzweifel/git-auto-commit-action@v5
        with:
          commit_message: apply auto formatting
          branch: ${{ github.head_ref }}
