Skip to content

Commit 5d4bd96

Browse files
committed
build: add a job to periodically update pre-commit
Signed-off-by: Dmitry Dygalo <dmitry.dygalo@workato.com>
1 parent 1ce4fec commit 5d4bd96

File tree

1 file changed

+35
-0
lines changed

1 file changed

+35
-0
lines changed
Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
name: Update pre-commit
2+
3+
on:
4+
schedule:
5+
- cron: 0 0 * * 0
6+
workflow_dispatch:
7+
8+
permissions:
9+
pull-requests: write
10+
contents: write
11+
12+
jobs:
13+
release:
14+
name: Update pre-commit
15+
runs-on: ubuntu-22.04
16+
steps:
17+
- uses: actions/checkout@v4.1.7
18+
with:
19+
fetch-depth: 1
20+
submodules: true
21+
22+
- run: pip install pre-commit
23+
- run: pre-commit autoupdate
24+
25+
- name: Open pull request
26+
uses: peter-evans/create-pull-request@v6
27+
with:
28+
token: ${{ secrets.GITHUB_TOKEN }}
29+
delete-branch: true
30+
title: Update pre-commit
31+
body: Automatically update pre-commit
32+
commit-message: 'chore: Update pre-commit'
33+
committer: 'Stranger6667 <dmitry@dygalo.dev>'
34+
author: 'Stranger6667 <dmitry@dygalo.dev>'
35+
branch: "create-pull-request/update-pre-commit"

0 commit comments

Comments
 (0)