Stop toasting when the consensus-checklist creation race is lost #1305
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: Prettier (non-main) | |
| on: | |
| push: | |
| branches-ignore: [main] | |
| pull_request: | |
| branches-ignore: [main] | |
| jobs: | |
| prettier: | |
| runs-on: ubuntu-latest | |
| permissions: | |
| contents: write | |
| pull-requests: write | |
| steps: | |
| - name: Checkout repository | |
| uses: actions/checkout@v6 | |
| with: | |
| # On push → github.ref_name (branch) | |
| # On PR → github.head_ref (source branch) | |
| ref: ${{ github.head_ref || github.ref_name }} | |
| token: ${{ secrets.GITHUB_TOKEN }} | |
| - name: Setup workspace | |
| uses: ./.github/actions/setup-workspace | |
| with: | |
| build-workspace: 'false' | |
| - name: Run Prettier | |
| run: pnpm prettier --write . | |
| # Only commit and push on push events, not on pull_request | |
| - name: Commit changes | |
| if: github.event_name == 'push' | |
| run: | | |
| git config --global user.name 'GitHub Actions' | |
| git config --global user.email 'actions@github.com' | |
| git add -A | |
| git diff --quiet && git diff --staged --quiet || git commit -m "Apply Prettier formatting" | |
| git push |