Update Pre-commit Hooks #2
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: Update Pre-commit Hooks | |
| on: | |
| schedule: | |
| # Run every Monday at 10:00 AM UTC | |
| - cron: '0 10 * * 1' | |
| workflow_dispatch: # Allow manual triggering | |
| permissions: | |
| contents: write | |
| pull-requests: write | |
| jobs: | |
| update-hooks: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v6 | |
| - name: Set up Python | |
| uses: actions/setup-python@v6 | |
| with: | |
| python-version: "3.11" | |
| - name: Install pre-commit | |
| run: python -m pip install pre-commit | |
| - name: Update pre-commit hooks | |
| run: pre-commit autoupdate | |
| - name: Validate pre-commit hooks after update | |
| run: pre-commit run --all-files | |
| continue-on-error: true | |
| - name: Create Pull Request | |
| uses: peter-evans/create-pull-request@v8 | |
| with: | |
| token: ${{ secrets.GITHUB_TOKEN }} | |
| commit-message: "chore: update pre-commit hooks" | |
| title: "chore: update pre-commit hooks" | |
| body: | | |
| This PR updates the pre-commit hooks to their latest versions. | |
| Auto-generated by the update-pre-commit workflow. | |
| branch: update-pre-commit-hooks | |
| delete-branch: true | |
| assignees: ${{ github.repository_owner }} | |
| reviewers: ${{ github.repository_owner }} | |
| labels: | | |
| dependencies | |
| pre-commit | |
| automated |