-
-
Notifications
You must be signed in to change notification settings - Fork 0
57 lines (51 loc) · 1.71 KB
/
Copy pathprecommit-autoupdate.yml
File metadata and controls
57 lines (51 loc) · 1.71 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
---
# Check if precommit packages need to be updated and create PR if this is the case
name: Pre-commit auto-update
on: # yamllint disable-line rule:truthy
workflow_dispatch:
schedule:
# https://crontab.cronhub.io/
- cron: "30 22 1 */3 *"
jobs:
auto-update:
runs-on: ubuntu-latest
env:
FORCE_JAVASCRIPT_ACTIONS_TO_NODE24: true # Forces Node 24 runtime
steps:
- uses: actions/checkout@v6
- name: Set up Python
uses: actions/setup-python@v6
with:
python-version: 3.12
- name: Install pre-commit
run: pip install pre-commit
- name: Run pre-commit autoupdate
uses: j178/prek-action@v2
id: preCommit
with:
extra-args: >-
autoupdate
- uses: crazy-max/ghaction-import-gpg@v7
with:
gpg_private_key: ${{ secrets.GPG_PRIVATE_KEY }}
passphrase: ${{ secrets.GPG_PASSPHRASE }}
git_user_signingkey: true
git_commit_gpgsign: true
- uses: actions/create-github-app-token@v3.1.1
if: ${{ success() }}
id: generate-token
with:
app-id: ${{ secrets.APP_ID }}
private-key: ${{ secrets.APP_PRIVATE_KEY }}
- name: Create Pull Request
uses: peter-evans/create-pull-request@v8
with:
token: ${{ steps.generate-token.outputs.token }}
committer: fchastanet <237869+fchastanet@users.noreply.github.com>
branch: update/pre-commit-autoupdate
title: Auto-update pre-commit hooks
commit-message: Auto-update pre-commit hooks
body: |
Update versions of tools in pre-commit
configs to latest version
labels: dependencies