Skip to content

Commit 4c97e2e

Browse files
committed
FEATURE: Automatically update pre-commit hooks versions
1 parent 85c0f01 commit 4c97e2e

File tree

3 files changed

+42
-1
lines changed

3 files changed

+42
-1
lines changed
Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
name: Renovate Pre-commit Hooks
2+
3+
on:
4+
schedule:
5+
- cron: "0 0 * * *" # Runs daily at midnight
6+
workflow_dispatch: # Allows manual trigger
7+
8+
jobs:
9+
renovate:
10+
runs-on: ubuntu-latest
11+
steps:
12+
- name: Checkout
13+
uses: actions/checkout@v4
14+
15+
- name: Self-hosted Renovate
16+
uses: renovatebot/[email protected]
17+
with:
18+
token: ${{ secrets.GITHUB_TOKEN }}
19+
configurationFile: renovate-config.json
20+
env:
21+
LOG_LEVEL: debug
22+
23+
- name: Create Pull Request
24+
uses: peter-evans/create-pull-request@v5
25+
with:
26+
token: ${{ secrets.GITHUB_TOKEN }}
27+
branch: renovate/pre-commit-hooks
28+
title: "chore(deps): update pre-commit hooks"
29+
commit-message: "chore(deps): update pre-commit hooks"
30+
body: |
31+
Updates pre-commit hook versions in .pre-commit-config.yaml

REUSE.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ SPDX-FileCopyrightText = "2024-2025 Amilcar Lucas"
2626
SPDX-License-Identifier = "GPL-3.0-or-later"
2727

2828
[[annotations]]
29-
path = ["24_inflight_magnetometer_fit_setup.pdef.xml", "REUSE.toml", "SECURITY.md", "SetupDeveloperPC.bat", "SetupDeveloperPC.sh"]
29+
path = ["24_inflight_magnetometer_fit_setup.pdef.xml", "REUSE.toml", "SECURITY.md", "SetupDeveloperPC.bat", "SetupDeveloperPC.sh", "renovate-config.json"]
3030
SPDX-FileCopyrightText = "2024-2025 Amilcar Lucas"
3131
SPDX-License-Identifier = "GPL-3.0-or-later"
3232

renovate-config.json

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
{
2+
"extends": ["config:base"],
3+
"enabledManagers": ["pre-commit"],
4+
"packageRules": [
5+
{
6+
"matchManagers": ["pre-commit"],
7+
"automerge": true
8+
}
9+
]
10+
}

0 commit comments

Comments
 (0)