-
Notifications
You must be signed in to change notification settings - Fork 0
47 lines (39 loc) · 1.31 KB
/
upgrade_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
name: Pre-commit auto-update
on:
workflow_dispatch:
schedule:
- cron: "30 5 1 * *" # Update monthly on the first day of the month at 5:30am UTC
jobs:
auto-update:
name: Auto update pre-commit
runs-on: ubuntu-latest
env:
app_id: ${{ secrets.APP_ID }}
app_private_key: ${{ secrets.APP_PRIVATE_KEY }}
steps:
- name: Checkout
uses: actions/[email protected]
- name: Set up Python
uses: actions/[email protected]
with:
python-version: "3.11"
- name: Generate token
id: generate_token
uses: tibdex/[email protected]
with:
app_id: ${{ env.app_id }}
private_key: ${{ env.app_private_key }}
- name: Install pre-commit
run: pip install pre-commit
- name: Run pre-commit autoupdate
run: pre-commit autoupdate
- name: Create Pull Request
uses: peter-evans/[email protected]
with:
branch: update/pre-commit/autoupdate
title: Auto-update pre-commit hooks
commit-message: Auto-update pre-commit hooks
body: Bump versions of pre-commit tools to latest version
labels: Pre-commit
token: ${{ steps.generate_token.outputs.token }}
assignees: ${{ secrets.DEFAULT_UPDATE_ASSIGNEE }}