-
Notifications
You must be signed in to change notification settings - Fork 284
37 lines (34 loc) · 1.08 KB
/
pre_commit_auto_update.yml
File metadata and controls
37 lines (34 loc) · 1.08 KB
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
# Run a pre-commit autoupdate every week and open a pull request if needed
name: Pre-commit auto-update
on:
# At 00:00 on the 1st of every month.
schedule:
- cron: "0 0 1 * *"
workflow_dispatch:
permissions:
contents: write
pull-requests: write
jobs:
pre-commit-auto-update:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Set up Python
uses: actions/setup-python@v5
- name: Install pre-commit
run: pip install pre-commit
- name: Run pre-commit
run: pre-commit autoupdate
- name: Set git config
run: |
git config --local user.email "action@github.com"
git config --local user.name "GitHub Action"
- uses: peter-evans/create-pull-request@v8
with:
token: ${{ github.token }}
branch: update/pre-commit-hooks
title: Update pre-commit hooks
commit-message: "Update pre-commit hooks"
body: Update versions of pre-commit hooks to latest version.
labels: "dependencies,github_actions"