Update .pre-commit-config.yaml #1
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-config.yaml | |
| on: | |
| schedule: | |
| - cron: '0 3 * * 1' # Every Monday at 03:00 UTC | |
| workflow_dispatch: | |
| jobs: | |
| update-pre-commit-config: | |
| runs-on: ubuntu-latest | |
| permissions: | |
| contents: write | |
| pull-requests: write | |
| steps: | |
| - name: Checkout repository | |
| uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0 | |
| - name: Install pre-commit | |
| run: pipx install pre-commit | |
| - name: Update .pre-commit-config.yaml | |
| run: pre-commit autoupdate --freeze | |
| - name: Apply pre-commit | |
| run: | | |
| n=0 | |
| while [[ $n -lt 5 ]] && ! pre-commit run --all; do | |
| ((n++)) | |
| done | |
| exit $? | |
| - name: Create Pull Request | |
| uses: peter-evans/create-pull-request@271a8d0340265f705b14b6d32b9829c1cb33d45e # v7.0.8 | |
| with: | |
| commit-message: "chore(deps): Update .pre-commit-config.yaml" | |
| title: "chore(deps): Update .pre-commit-config.yaml" | |
| body: "Automated update of .pre-commit-config.yaml via scheduled workflow." | |
| branch: "update/pre-commit-config-yaml" | |
| base: ${{ github.ref_name }} | |
| labels: "update" | |
| reviewers: "linuxdaemon" | |
| assignees: "linuxdaemon" | |
| sign-commits: true |