-
-
Notifications
You must be signed in to change notification settings - Fork 6
45 lines (38 loc) · 1.45 KB
/
pre-commit-update.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
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 * * 3' # Every Wednesday 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.