Skip to content

Commit dfb8307

Browse files
committed
Add renovate for repo updates
1 parent 7f8af00 commit dfb8307

4 files changed

Lines changed: 128 additions & 0 deletions

File tree

‎.github/prompts/renovate-pr.md‎

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
Review and fix this Renovate dependency update PR.
2+
3+
Hard requirements:
4+
5+
- Read and follow `AGENTS.md` and any project-specific `AGENTS.md` files.
6+
- Treat this PR as a dependency maintenance PR only. Do not make unrelated
7+
refactors or feature changes.
8+
- Preserve public API and binary compatibility.
9+
- Inspect the dependency/build-tool updates already made by Renovate.
10+
- Run `make check-all`.
11+
- If the build, formatting, compilation, or tests fail, fix the failures on
12+
this PR branch.
13+
- If no code changes are needed, leave the branch unchanged.
14+
- Do not merge or close the PR.
15+
16+
When finished, summarize what you checked, what you fixed, and whether
17+
`make check-all` passes.

‎.github/renovate-config.js‎

Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
1+
module.exports = {
2+
platform: "github",
3+
repositories: ["funfix/database"],
4+
gitAuthor: "Renovate Bot <renovate@funfix.org>",
5+
branchPrefix: "renovate/",
6+
onboarding: false,
7+
requireConfig: "optional",
8+
9+
extends: [":dependencyDashboard"],
10+
11+
enabledManagers: ["github-actions", "gradle", "gradle-wrapper", "sbt"],
12+
13+
ignorePaths: ["**/.gradle/**"],
14+
15+
packageRules: [
16+
{
17+
description: "Group all dependency updates into a single PR",
18+
matchManagers: ["github-actions", "gradle", "gradle-wrapper", "sbt"],
19+
groupName: "dependencies",
20+
groupSlug: "all-dependencies",
21+
recreateWhen: "always",
22+
group: {
23+
commitMessageTopic: "dependencies",
24+
commitMessageExtra: "",
25+
},
26+
},
27+
{
28+
description: "Only use stable dotted numeric JVM dependency versions",
29+
matchManagers: ["gradle", "gradle-wrapper", "sbt"],
30+
allowedVersions: "/^\\d+(?:\\.\\d+)+$/",
31+
},
32+
{
33+
description: "Wait one week before proposing dependency updates",
34+
matchManagers: ["github-actions", "gradle", "gradle-wrapper", "sbt"],
35+
minimumReleaseAge: "1 days",
36+
minimumReleaseAgeBehaviour: "timestamp-optional",
37+
},
38+
],
39+
};
Lines changed: 53 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,53 @@
1+
name: opencode-renovate
2+
3+
on:
4+
pull_request:
5+
types: [opened, synchronize, reopened, ready_for_review]
6+
7+
concurrency:
8+
group: opencode-renovate-${{ github.event.pull_request.number }}
9+
cancel-in-progress: true
10+
11+
jobs:
12+
opencode:
13+
if: |
14+
github.event.pull_request.head.repo.full_name == github.repository &&
15+
startsWith(github.event.pull_request.head.ref, 'renovate/') &&
16+
github.actor != 'github-actions[bot]' &&
17+
!github.event.pull_request.draft
18+
runs-on: ubuntu-latest
19+
permissions:
20+
id-token: write
21+
contents: write
22+
pull-requests: write
23+
issues: write
24+
steps:
25+
- name: Checkout Renovate PR branch
26+
uses: actions/checkout@v6
27+
with:
28+
repository: ${{ github.event.pull_request.head.repo.full_name }}
29+
ref: ${{ github.event.pull_request.head.ref }}
30+
persist-credentials: false
31+
32+
- uses: actions/setup-java@v5
33+
with:
34+
java-version: "21"
35+
distribution: temurin
36+
- uses: sbt/setup-sbt@v1
37+
38+
- name: Load prompt file
39+
id: load-prompt
40+
run: |
41+
echo "content<<EOF" >> $GITHUB_OUTPUT
42+
cat .github/prompts/renovate-pr.md >> $GITHUB_OUTPUT
43+
echo "EOF" >> $GITHUB_OUTPUT
44+
45+
- name: Run opencode
46+
uses: anomalyco/opencode/github@latest
47+
env:
48+
OPENCODE_API_KEY: ${{ secrets.OPENCODE_API_KEY }}
49+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
50+
with:
51+
model: opencode-go/deepseek-v4-pro
52+
use_github_token: true
53+
prompt: ${{ steps.load-prompt.outputs.content }}

‎.github/workflows/renovate.yaml‎

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
name: Renovate
2+
3+
on:
4+
workflow_dispatch:
5+
schedule:
6+
- cron: '17 4 * * 1'
7+
8+
jobs:
9+
renovate:
10+
runs-on: ubuntu-latest
11+
steps:
12+
- name: Checkout
13+
uses: actions/checkout@v6
14+
15+
- name: Renovate
16+
uses: renovatebot/github-action@v46.1.14
17+
with:
18+
configurationFile: .github/renovate-config.js
19+
token: ${{ secrets.RENOVATE_TOKEN }}

0 commit comments

Comments
 (0)