Skip to content

Commit 5c589a9

Browse files
kobayashiyabako16giwilltry42
authored andcommitted
feat(renovate): add custom manager and datasource for k3s version updates
1 parent 3772bce commit 5c589a9

File tree

1 file changed

+28
-1
lines changed

1 file changed

+28
-1
lines changed

renovate.json

Lines changed: 28 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,13 @@
2525
"proxy"
2626
]
2727
},
28+
{
29+
"matchPackageNames": [
30+
"k3s"
31+
],
32+
"enabled": true,
33+
"branchName": "renovate/k3s-{{newVersion}}"
34+
},
2835
{
2936
"automerge": true,
3037
"automergeType": "pr",
@@ -33,5 +40,25 @@
3340
"*"
3441
]
3542
}
36-
]
43+
],
44+
"customManagers": [
45+
{
46+
"customType": "regex",
47+
"managerFilePatterns": ["/^version\\/version.go$/"],
48+
"matchStrings": [
49+
"var K3sVersion = \"(?<currentValue>v[0-9a-zA-Z\\.-]+-k3s[0-9]*)\""
50+
],
51+
"depNameTemplate": "k3s",
52+
"versioningTemplate": "loose",
53+
"datasourceTemplate": "custom.k3s"
54+
}
55+
],
56+
"customDatasources": {
57+
"k3s": {
58+
"defaultRegistryUrlTemplate": "https://update.k3s.io/v1-release/channels",
59+
"transformTemplates": [
60+
"{\"releases\":[{\"version\": $replace($$.(data[id = 'stable'].latest), '+', '-'),\"sourceUrl\":\"https://github.com/k3s-io/k3s\",\"changelogUrl\":$join([\"https://github.com/k3s-io/k3s/releases/tag/\",data[id = 'stable'].latest])}],\"sourceUrl\": \"https://github.com/k3s-io/k3s\",\"homepage\": \"https://k3s.io/\"}"
61+
]
62+
}
63+
}
3764
}

0 commit comments

Comments
 (0)