-
-
Notifications
You must be signed in to change notification settings - Fork 17
43 lines (41 loc) · 1.26 KB
/
pre-commit-update.yml
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
name: Pre-commit auto-update
on:
schedule:
- cron: "0 8 15 * *"
# on demand
workflow_dispatch:
jobs:
auto-update:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: "3.x"
cache: "pip"
cache-dependency-path: |
requirements_production.txt
requirements_testing.txt
.pre-commit-config.yaml
- name: Install dependencies
# needed for the mypy hook
run: |
pip install -r requirements_testing.txt
- name: Pre-commit auto-update
env:
# new branch is created in create-pull-request step
SKIP: no-commit-to-branch
run: |
pre-commit autoupdate
- uses: peter-evans/create-pull-request@v7
with:
token: ${{ secrets.GITHUB_TOKEN }}
branch: update/pre-commit-hooks
title: Update pre-commit hooks
commit-message: "update pre-commit hooks"
labels: |
dependencies
body: |
Update versions of pre-commit hooks to latest version.
Run tests locally to check for conflicts since PRs from GitHub Actions don't trigger workflows.