Prek Manual #410
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: Prek Manual | |
| on: | |
| workflow_run: | |
| workflows: ["Manual Publish to PyPI", "main"] | |
| types: | |
| - completed | |
| jobs: | |
| prek-manual: | |
| runs-on: ubuntu-latest | |
| if: ${{ github.event.workflow_run.conclusion == 'success' }} | |
| steps: | |
| - uses: actions/checkout@v6 | |
| - uses: actions/setup-python@v5 | |
| - uses: actions/setup-node@v4 | |
| with: | |
| node-version: '20' | |
| - uses: actions/setup-go@v5 | |
| with: | |
| go-version: 'stable' | |
| - name: Install formatters | |
| run: | | |
| # Install Python formatters and prek | |
| pip install ruff prek | |
| # Install Node.js based formatters | |
| npm install -g prettier @taplo/cli | |
| # Install Go based formatters | |
| go install github.com/google/yamlfmt/cmd/yamlfmt@latest | |
| # Add Go bin to PATH | |
| echo "$HOME/go/bin" >> $GITHUB_PATH | |
| - name: Run prek | |
| run: prek run --all-files --show-diff-on-failure |