draft autoformat bot #1
Workflow file for this run
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: PR Formatter | ||
| env: | ||
| JULIA_NUM_THREADS: 2 | ||
| on: | ||
| pull_request: | ||
| jobs: | ||
| build: | ||
| runs-on: ubuntu-latest | ||
| steps: | ||
| pre-commit: | ||
| runs-on: ubuntu-latest | ||
| steps: | ||
| - name: Checkout | ||
| uses: actions/checkout@v3 | ||
| with: | ||
| persist-credentials: false # otherwise, the token used is the GITHUB_TOKEN, instead of your personal token | ||
| fetch-depth: 0 # otherwise, you will failed to push refs to dest repo | ||
| - name: Setup Python | ||
| uses: actions/setup-python@v3 | ||
| - name: Run pre-commit | ||
| uses: pre-commit/[email protected] | ||
| - name: Commit files | ||
| run: | | ||
| git config --local user.email "[email protected]" | ||
| git config --local user.name "PR Pre-Commit Bot" | ||
| git commit -m "add bot commits" -a | ||
| - name: Push changes | ||
| uses: ad-m/[email protected] | ||
| with: | ||
| github_token: ${{ secrets.GITHUB_TOKEN }} | ||
| branch: ${{ github.ref }} | ||