-
Notifications
You must be signed in to change notification settings - Fork 104
43 lines (36 loc) · 1.2 KB
/
pre-commit-autoupdate.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:
# every day at midnight
schedule:
- cron: "0 0 * * *"
# on demand
workflow_dispatch:
jobs:
auto-update:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Configure Python 3.10
uses: actions/setup-python@v5
with:
python-version: '3.10'
- name: Use Pip cache if available
uses: actions/cache@v4
with:
path: ~/.cache/pip
key: ${{ runner.os }}-pip3-${{ hashFiles('*requirements.txt') }}
- name: Install wheel package
run: pip install wheel
- name: Install dependencies (including pytype)
# needed to install pytype
run: pip install -e .[dev]
- name: Update and validate pre-commit updates
uses: browniebroke/pre-commit-autoupdate-action@main
- name: Create Pull request with pre-commit updates
uses: peter-evans/create-pull-request@v6
with:
token: ${{ secrets.GITHUB_TOKEN }}
branch: update/pre-commit-hooks
title: Update pre-commit hooks
commit-message: "CI: update pre-commit hooks"
body: Update versions of pre-commit hooks to latest version.