Update template pre-commit #4
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 template pre-commit | |
permissions: | |
contents: write | |
pull-requests: write | |
on: | |
# Allow manual runs through the web UI | |
workflow_dispatch: | |
schedule: | |
# ┌───────── minute (0 - 59) | |
# │ ┌───────── hour (0 - 23) | |
# │ │ ┌───────── day of the month (1 - 31) | |
# │ │ │ ┌───────── month (1 - 12 or JAN-DEC) | |
# │ │ │ │ ┌───────── day of the week (0 - 6 or SUN-SAT) | |
- cron: '0 7 1 * 3' # First Wednesday of the month at 7am UTC (so it can be merged before the monday package updates) | |
jobs: | |
update: | |
runs-on: ubuntu-latest | |
strategy: | |
fail-fast: true | |
steps: | |
- uses: actions/checkout@v4 | |
with: | |
fetch-depth: 0 | |
- uses: actions/setup-python@v5 | |
- name: Install pre-commit | |
run: pip install pre-commit | |
- name: Run pre-commit update | |
id: check | |
run: pre-commit autoupdate -c '{{ cookiecutter.package_name }}/.pre-commit-config.yaml' | |
- name: Create pull request | |
uses: peter-evans/create-pull-request@v7 | |
with: | |
token: ${{ secrets.GITHUB_TOKEN }} | |
delete-branch: true | |
branch-suffix: timestamp | |
title: "pre-commit updates in the template" | |
body: | | |
This is an autogenerated PR, which updates the `{{ cookiecutter.package_name }}/.pre-commit-config.yaml` file. |