Skip to content

Commit d788581

Browse files
authored
Merge pull request #4978 from gofogo/chore/added-renovate
feat(deps): added renovate config for custom regexes
2 parents 4b2fd49 + 77a9961 commit d788581

File tree

3 files changed

+86
-0
lines changed

3 files changed

+86
-0
lines changed

.github/renovate-config.js

Lines changed: 57 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,57 @@
1+
"use strict";
2+
// https://github.com/renovatebot/github-action/blob/main/.github/renovate.json
3+
// https://docs.renovatebot.com/configuration-options/
4+
5+
module.exports = {
6+
"extends": [":disableRateLimiting", ":semanticCommits"],
7+
"assigneesFromCodeOwners": true,
8+
"gitAuthor": "Renovate Bot <bot@external-dns.com>",
9+
"onboarding": false,
10+
"platform": "github",
11+
"repositories": [
12+
"kubernetes-sigs/external-dns"
13+
],
14+
"printConfig": false,
15+
"prConcurrentLimit": 0,
16+
"prHourlyLimit": 0,
17+
"stabilityDays": 3,
18+
"pruneStaleBranches": true,
19+
"recreateClosed": true,
20+
"dependencyDashboard": false,
21+
"requireConfig": false,
22+
"rebaseWhen": "behind-base-branch",
23+
"baseBranches": ["master", "main"],
24+
"recreateWhen": "always",
25+
"semanticCommits": "enabled",
26+
"pre-commit": {
27+
"enabled": true
28+
},
29+
"labels": ["{{depType}}", "datasource::{{datasource}}", "type::{{updateType}}", "manager::{{manager}}"], // can be overridden per packageRule
30+
"addLabels": ["renovate-bot"], // cannot be overridden, any packageRule config extends this
31+
"packageRules": [
32+
{
33+
"groupName": "pre-commit",
34+
"matchManagers": ["pre-commit"],
35+
"addLabels": ["pre-commit", "skip-release"]
36+
},
37+
],
38+
"enabledManagers": [ // supported managers https://docs.renovatebot.com/modules/manager/
39+
"regex",
40+
"pre-commit"
41+
],
42+
"customManagers": [ // https://docs.renovatebot.com/modules/manager/regex/
43+
{
44+
// to capture registry.k8s.io/external-dns/external-dns:<version> in *.md files
45+
"customType": "regex",
46+
"fileMatch": [
47+
".*\\.md$"
48+
],
49+
"matchStrings": [
50+
"(?<depName>registry.k8s.io\/external-dns\/external-dns):(?<currentValue>.*)"
51+
],
52+
"depNameTemplate": "kubernetes-sigs/external-dns",
53+
"datasourceTemplate": "github-releases",
54+
"versioningTemplate": "semver"
55+
}
56+
]
57+
};

.github/renovate.json

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
{
2+
"$schema": "https://docs.renovatebot.com/renovate-schema.json"
3+
}
Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
name: update-versions-with-renovate
2+
3+
on:
4+
push:
5+
branches: [main, master]
6+
schedule:
7+
# https://crontab.guru/
8+
# once a day
9+
- cron: '0 0 * * *'
10+
11+
jobs:
12+
update-versions-with-renovate:
13+
runs-on: ubuntu-latest
14+
if: github.repository == 'kubernetes-sigs/external-dns'
15+
steps:
16+
- name: checkout
17+
uses: actions/checkout@v4.2.2
18+
# https://github.com/renovatebot/github-action
19+
- name: self-hosted renovate
20+
uses: renovatebot/github-action@v41.0.14
21+
with:
22+
# https://docs.github.com/en/actions/security-for-github-actions/security-guides/automatic-token-authentication
23+
token: ${{ secrets.GITHUB_TOKEN }}
24+
configurationFile: .github/renovate-config.js
25+
env:
26+
LOG_LEVEL: info

0 commit comments

Comments
 (0)