Update pre-commit Hooks #2
This file contains 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: | |
# every Monday at 12:30 AM UTC | |
- cron: "30 0 * * 1" | |
workflow_dispatch: | |
jobs: | |
pre-commit-auto-update: | |
runs-on: ubuntu-20.04 | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: actions/setup-python@v5 | |
with: | |
python-version: "3.10" | |
- uses: browniebroke/pre-commit-autoupdate-action@v1.0.0 | |
- if: always() | |
uses: actions/create-github-app-token@v1 | |
id: app-token | |
with: | |
app-id: ${{ vars.PR_APP_ID }} | |
private-key: ${{ secrets.PR_APP_KEY }} | |
- if: always() | |
uses: peter-evans/create-pull-request@v6 | |
with: | |
token: ${{ steps.app-token.outputs.token }} | |
commit-message: "Automated `pre-commit` hook update" | |
branch: pre-commit-hooks-update | |
title: "[MNT] Automated `pre-commit` hook update" | |
body: "Automated weekly update to `.pre-commit-config.yaml` hook versions." | |
labels: maintenance, full pre-commit, no changelog |