Skip to content

Update

Update #6

Workflow file for this run

name: Update
on:
schedule:
- cron: 0 1 * * 0 # weekly
workflow_dispatch:
concurrency:
group: update
cancel-in-progress: true
jobs:
pre-commit-autoupdate:
runs-on: ubuntu-latest
permissions:
contents: write
pull-requests: write
steps:
- name: Checkout the repository
uses: actions/checkout@v6
- name: Create requirements.txt
run: echo 'pre-commit' >requirements.txt
- name: Set up Python
uses: actions/setup-python@v6
with:
python-version: '3.12'
cache: 'pip'
- name: Install pre-commit
run: pip install -r requirements.txt
- name: Autoupdate hooks
run: |
pre-commit autoupdate
rm -f requirements.txt
# Prerequisite: The following repository setting is required:
# Actions -> General -> Workflow permissions ->
# Allow GitHub Actions to create and approve pull requests
- name: Create pull request
uses: peter-evans/create-pull-request@v8
with:
commit-message: 'chore(pre-commit): autoupdate hooks'
committer: 'github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>'
author: 'github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>'
branch: chore/create-pull-request/pre-commit-autoupdate
delete-branch: true
title: 'chore(pre-commit): autoupdate hooks'
body: |
Automated `pre-commit autoupdate`.