name: Format code with Prettier on: push: branches: ["master"] jobs: format: runs-on: linux container: node:20-bookworm steps: - name: Checkout repo uses: actions/checkout@v4 - name: Install dependencies run: npm install - name: Run Prettier run: npx prettier --write . - name: Commit changes (if any) run: | git config user.name "forgejo-bot" git config user.email "forgejo-bot@local" git add . git diff --cached --quiet || git commit -m "chore: format with prettier" git push