Skip to content

Commit eb66086

Browse files
johnlettmanlukas-brzak-prusa
authored andcommitted
feat(repo): add workflow to automatically update pre-commit hooks
1 parent 569ea99 commit eb66086

1 file changed

Lines changed: 34 additions & 0 deletions

File tree

Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
name: Update `pre-commit`
2+
3+
on:
4+
# Weekdays at 10:00 AM in Czech Republic (Europe/Prague)
5+
# - 09:00 UTC = 10:00 in winter (CET, UTC+1)
6+
# - 09:00 UTC = 11:00 in summer (CEST, UTC+2)
7+
schedule:
8+
- cron: "0 9 * * 1-5"
9+
# On demand
10+
workflow_dispatch:
11+
12+
jobs:
13+
auto-update:
14+
name: Auto-update `pre-commit` hooks
15+
runs-on: ubuntu-latest
16+
steps:
17+
- name: Checkout
18+
uses: actions/checkout@v6
19+
20+
- name: Setup Python
21+
uses: actions/setup-python@v6
22+
23+
- name: Auto-update `pre-commit` hooks
24+
uses: browniebroke/pre-commit-autoupdate-action@f5c3ec85103b9f8f9be60b9c006cec763d2bdd02
25+
26+
- name: Create Pull Request
27+
uses: peter-evans/create-pull-request@v7
28+
if: always()
29+
with:
30+
token: ${{ secrets.GITHUB_TOKEN }}
31+
branch: update/pre-commit-hooks
32+
title: Update pre-commit hooks
33+
commit-message: "chore: update pre-commit hooks"
34+
body: Update versions of pre-commit hooks to latest version.

0 commit comments

Comments
 (0)