Skip to content

Commit 4a21c3f

Browse files
committed
added renovate json file
Signed-off-by: hjoshi123 <[email protected]> added renovate test action Signed-off-by: hjoshi123 <[email protected]> changed renovate config Signed-off-by: hjoshi123 <[email protected]>
1 parent 6da1111 commit 4a21c3f

File tree

2 files changed

+188
-0
lines changed

2 files changed

+188
-0
lines changed

.github/workflows/renovate.yml

Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
name: Renovate
2+
on:
3+
workflow_dispatch:
4+
push:
5+
schedule:
6+
- cron: "* * * * 0,6"
7+
- cron: "* 22-23,0-4 * * 1-5"
8+
jobs:
9+
renovate:
10+
runs-on: ubuntu-latest
11+
permissions:
12+
contents: write
13+
issues: write
14+
pull-requests: write
15+
id-token: write
16+
steps:
17+
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
18+
# Adding `fetch-depth: 0` makes sure tags are also fetched. We need
19+
# the tags so `git describe` returns a valid version.
20+
# see https://github.com/actions/checkout/issues/701 for extra info about this option
21+
with: { fetch-depth: 0 }
22+
23+
- name: Self-hosted Renovate
24+
uses: renovatebot/[email protected]
25+
with:
26+
configurationFile: renovate.json5
27+
token: ${{ secrets.GITHUB_TOKEN }}
28+
env:
29+
RENOVATE_REPOSITORIES: ${{ github.repository }}
30+
RENOVATE_PLATFORM_COMMIT: "true"
31+
LOG_LEVEL: "debug"
32+
RENOVATE_ALLOWED_COMMANDS: '["^make"]'
33+
RENOVATE_FORK_PROCESSING: "enabled"

renovate.json5

Lines changed: 155 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,155 @@
1+
{
2+
$schema: "https://docs.renovatebot.com/renovate-schema.json",
3+
enabled: true,
4+
extends: ["config:base", ":dependencyDashboard", ":gitSignOff"],
5+
timezone: "Europe/London",
6+
labels: ["dependencies", "renovate"],
7+
prConcurrentLimit: 5,
8+
prHourlyLimit: 0,
9+
semanticCommits: "enabled",
10+
semanticCommitScope: "deps",
11+
onboarding: false,
12+
platform: "github",
13+
repositories: ["cert-manager/cert-manager", "hjoshi123/cert-manager"],
14+
automerge: false,
15+
useBaseBranchConfig: "merge",
16+
postUpgradeTasks: {
17+
commands: ["make generate"],
18+
executionMode: "update",
19+
},
20+
postUpdateOptions: ["gomodTidy", "gomodUpdateImportPaths"],
21+
vulnerabilityAlerts: {
22+
enabled: true,
23+
labels: ["security"],
24+
schedule: ["at any time"],
25+
},
26+
packageRules: [
27+
{
28+
description: "Group Kubernetes dependencies",
29+
groupName: "kubernetes packages",
30+
matchDatasources: ["go"],
31+
matchPackageNames: ["k8s.io/**", "sigs.k8s.io/**"],
32+
groupSlug: "kubernetes",
33+
enabled: true,
34+
automerge: true,
35+
},
36+
{
37+
description: "Group Azure SDK dependencies",
38+
groupName: "Azure SDK",
39+
matchDatasources: ["go"],
40+
groupSlug: "azure-sdk-go",
41+
enabled: true,
42+
automerge: true,
43+
matchPackagePrefixes: ["github.com/Azure{/,}**"],
44+
},
45+
{
46+
description: "Group Golang.org/x packages",
47+
groupSlug: "go-x",
48+
matchPackageNames: ["golang.org/x/**"],
49+
enabled: true,
50+
groupName: "Go extended libs",
51+
},
52+
{
53+
description: "Group AWS SDK dependencies",
54+
groupName: "AWS SDK",
55+
matchDatasources: ["go"],
56+
enabled: true,
57+
groupSlug: "aws-sdk-go",
58+
matchPackagePrefixes: ["github.com/aws/aws-sdk-go-v2{/,}**"],
59+
},
60+
{
61+
description: "Group GitHub Actions",
62+
groupName: "GitHub Actions",
63+
matchManagers: ["github-actions"]
64+
},
65+
{
66+
description: "Pin Go version more conservatively",
67+
matchDatasources: ["golang-version"],
68+
rangeStrategy: "pin"
69+
},
70+
{
71+
description: "Group testing tools",
72+
groupName: "testing tools",
73+
matchPackageNames: [
74+
"github.com/onsi/ginkgo",
75+
"github.com/onsi/gomega",
76+
"github.com/stretchr/testify"
77+
],
78+
groupSlug: "testing",
79+
},
80+
{
81+
description: "Security updates should be raised immediately",
82+
matchDatasources: ["go"],
83+
matchUpdateTypes: ["patch"],
84+
prPriority: 10,
85+
labels: ["security", "priority/important"],
86+
minimumReleaseAge: "0 days",
87+
matchPackageNames: [
88+
"golang.org/x/crypto",
89+
"golang.org/x/net",
90+
"github.com/golang-jwt/jwt",
91+
"google.golang.org/protobuf"
92+
],
93+
},
94+
{
95+
description: "Be careful with Helm dependencies",
96+
matchDatasources: ["helm"],
97+
rangeStrategy: "bump",
98+
enabled: false,
99+
commitMessagePrefix: "chore(helm):",
100+
},
101+
{
102+
description: "Group linting tools",
103+
groupName: "linters",
104+
groupSlug: "linters",
105+
matchPackageNames: [
106+
"golangci/golangci-lint",
107+
"mvdan.cc/gofumpt",
108+
"github.com/daixiang0/gci"
109+
],
110+
},
111+
{
112+
description: "Update cert-manager images",
113+
matchDatasources: ["docker"],
114+
matchPackageNames: ["/^quay.io/jetstack/cert-manager/"],
115+
groupName: "cert-manager images",
116+
},
117+
{
118+
description: "Limit major updates",
119+
matchUpdateTypes: ["major"],
120+
dependencyDashboardApproval: true,
121+
labels: ["breaking-change", "approval-needed"],
122+
}
123+
],
124+
ignorePaths: [
125+
"**/vendor/**",
126+
"**/node_modules/**",
127+
"**/__tests__/**",
128+
"**/test/**"
129+
],
130+
prBodyDefinitions: {
131+
Package: "{{depName}}",
132+
Type: "{{depType}}",
133+
Update: "{{updateType}}",
134+
"Current value": "{{currentValue}}",
135+
"New value": "{{newValue}}",
136+
Change: "`{{displayFrom}}` -> `{{displayTo}}`",
137+
References: "{{references}}",
138+
"Package file": "{{packageFile}}"
139+
},
140+
prBodyColumns: ["Package", "Type", "Update", "Change", "References"],
141+
prBodyNotes: [
142+
"**Note**: This PR was automatically created by Renovate Bot.",
143+
"",
144+
"Before merging:",
145+
"- [ ] Ensure all tests pass",
146+
"- [ ] Review the changelog/release notes of updated dependencies",
147+
"- [ ] Check for any breaking changes",
148+
"- [ ] Verify cert-manager still builds correctly"
149+
],
150+
ignoreDeps: ["launchpad.net/gocheck"],
151+
constraints: {
152+
go: ">=1.21"
153+
}
154+
155+
}

0 commit comments

Comments
 (0)