name: Empty format test

on: push

jobs:
  test:
    runs-on: ubuntu-latest
    steps:
      - run: echo "test"

  format:
    runs-on: ubuntu-latest
    permissions:
      contents: write
    steps:
      - uses: actions/checkout@v5
        with:
          token: ${{ secrets.GH_TOKEN }}
      - uses: actions/setup-node@v5
        with:
          node-version: 22
      - run: git pull
      - run: |
          npx prettier --write "**/*.{md,yaml,yml,js}" --trailing-comma all --print-width 80 --single-quote true
          git --no-pager diff
      - uses: stefanzweifel/git-auto-commit-action@v6
        with:
          commit_message: 'style: re-format / npx prettier --write "**/*.{md,yaml,yml,js}"'
