-
Notifications
You must be signed in to change notification settings - Fork 2
51 lines (48 loc) · 1.54 KB
/
pre-commit.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
44
45
46
47
48
49
50
51
name: Dependabot on pre-commit hooks
concurrency:
cancel-in-progress: true
group: ${{ github.workflow }}-${{ github.ref_name }}
on:
schedule:
- cron: 13 2 * * 0 # weekly
jobs:
update:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/[email protected]
- name: Set up Python
uses: actions/[email protected]
with:
cache: pip
cache-dependency-path: pyproject.toml
check-latest: true
python-version: 3.11
- name: Install deps
env:
PIP_UPGRADE: True
PIP_UPGRADE_STRATEGY: eager
run: python -m pip install -e ".[dev]"
- name: Autoupdate pre-commit
run: pre-commit autoupdate
- name: Pre-commit cache
id: cache-pre-commit
uses: actions/[email protected]
with:
key: ${{ hashFiles('.pre-commit-config.yaml') }}
path: ~/.cache/pre-commit
- name: Update pre-commit cache if needed
if: ${{ ! steps.cache-pre-commit.outputs.cache-hit }}
run: pre-commit install-hooks
- name: Open dependabot-like PR
uses: peter-evans/[email protected]
with:
author: "GitHub <[email protected]>"
base: ${{ github.ref_name }}
branch: dependabot/pre-commit/${{ github.ref_name }}
committer: "GitHub <[email protected]>"
commit-message: "chore(dev): bump pre-commit hooks"
labels: |
dependencies
pre-commit
title: "chore(dev): bump pre-commit hooks"