.github/workflows/precommit_autoupdate.yaml #378
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
# Adapted from https://github.com/browniebroke/browniebroke.com, Copyright (c) 2017 Bruno Allaname, available under the | |
# MIT license | |
on: | |
schedule: | |
- cron: '0 0 * * *' | |
jobs: | |
autoupdate-precommit: | |
runs-on: ubuntu-latest | |
strategy: | |
matrix: | |
python-version: ["3.10", "3.11", "3.12"] | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Set up Python | |
uses: actions/setup-python@v3 | |
with: | |
python-version: ${{ matrix.python-version }} | |
- name: Install pre-commit | |
run: pip install pre-commit | |
- name: Run pre-commit autoupdate | |
run: pre-commit autoupdate | |
- name: Create Pull Request | |
uses: peter-evans/create-pull-request@v5 | |
with: | |
token: ${{ secrets.CPR_GITHUB_TOKEN }} | |
branch: update/pre-commit-autoupdate | |
title: Auto-update pre-commit hooks | |
commit-message: Auto-update pre-commit hooks | |
body: | | |
Update versions of tools in pre-commit | |
configs to latest version | |
labels: dependencies |