-
Notifications
You must be signed in to change notification settings - Fork 0
58 lines (48 loc) · 1.77 KB
/
Copy pathpre-commit-autoupdate.yml
File metadata and controls
58 lines (48 loc) · 1.77 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
52
53
54
55
56
57
58
name: Pre-commit Hook Autoupdate
on:
schedule:
- cron: '23 13 * * 1'
workflow_dispatch:
permissions:
contents: write
pull-requests: write
jobs:
autoupdate:
runs-on: ubuntu-latest
steps:
- name: Create release App token
id: release-token
uses: actions/create-github-app-token@bcd2ba49218906704ab6c1aa796996da409d3eb1 # v3.2.0
with:
app-id: ${{ vars.RELEASE_APP_ID }}
private-key: ${{ secrets.RELEASE_APP_PRIVATE_KEY }}
permission-contents: write
permission-pull-requests: write
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7
with:
token: ${{ steps.release-token.outputs.token }}
- uses: astral-sh/setup-uv@20cfd1bf945f4377ade1205e4dbc17946fc9a30d # v10.0.1
with:
enable-cache: true
- uses: actions/setup-python@5fda3b95a4ea91299a34e894583c3862153e4b97 # v7
with:
python-version: '3.14'
- name: Sync development dependencies
run: uv sync --dev
- name: Update pre-commit hook revisions
run: uv run pre-commit autoupdate
- name: Create pull request for hook updates
uses: peter-evans/create-pull-request@5f6978faf089d4d20b00c7766989d076bb2fc7f1 # v8
with:
branch: bot/pre-commit-autoupdate
delete-branch: true
commit-message: 'chore: autoupdate pre-commit hooks'
title: 'chore: autoupdate pre-commit hooks'
body: |
Automated weekly update of `.pre-commit-config.yaml` hook revisions.
Generated by the Pre-commit Hook Autoupdate workflow.
labels: |
chore
add-paths: |
.pre-commit-config.yaml
token: ${{ steps.release-token.outputs.token }}