-
Notifications
You must be signed in to change notification settings - Fork 1
51 lines (42 loc) · 1.34 KB
/
update-pre-commit.yml
File metadata and controls
51 lines (42 loc) · 1.34 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
38
39
40
41
42
43
44
45
46
47
48
49
50
51
name: Update Pre-commit Hooks
on:
schedule:
# Run every Monday at 10:00 AM UTC
- cron: '0 10 * * 1'
workflow_dispatch: # Allow manual triggering
permissions:
contents: write
pull-requests: write
jobs:
update-hooks:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v6
- name: Set up Python
uses: actions/setup-python@v6
with:
python-version: "3.11"
- name: Install pre-commit
run: python -m pip install pre-commit
- name: Update pre-commit hooks
run: pre-commit autoupdate
- name: Validate pre-commit hooks after update
run: pre-commit run --all-files
continue-on-error: true
- name: Create Pull Request
uses: peter-evans/create-pull-request@v8
with:
token: ${{ secrets.PAT }}
commit-message: "chore: update pre-commit hooks"
title: "chore: update pre-commit hooks"
body: |
This PR updates the pre-commit hooks to their latest versions.
Auto-generated by the update-pre-commit workflow.
branch: update-pre-commit-hooks
delete-branch: true
assignees: ${{ github.repository_owner }}
reviewers: ${{ github.repository_owner }}
labels: |
dependencies
pre-commit
automated