diff --git a/.forgejo/renovate/k3s.json b/.forgejo/renovate/k3s.json new file mode 100644 index 0000000..cc38e78 --- /dev/null +++ b/.forgejo/renovate/k3s.json @@ -0,0 +1,61 @@ +{ + "$schema": "https://docs.renovatebot.com/renovate-schema.json", + "packageRules": [ + { + "description": "Separate minor and patch updates for k3s", + "matchDatasources": ["github-releases"], + "matchPackageNames": ["k3s-io/k3s"], + "separateMultipleMinor": true, + "separateMinorPatch": true, + "branchTopic": "{{{depNameSanitized}}}{{#if isMinor}}-minor{{/if}}-{{{newMajor}}}{{#if isPatch}}.{{{newMinor}}}{{/if}}.x{{#if isLockfileUpdate}}-lockfile{{/if}}", + "commitMessageSuffix": "{{#if isMinor}}(minor){{/if}}{{#if isPatch}}(patch){{/if}}" + }, + { + "description": "No automerge for k3s major and minor updates", + "matchDatasources": ["github-releases"], + "matchPackageNames": ["k3s-io/k3s"], + "matchUpdateTypes": ["major", "minor"], + "automerge": false + }, + { + "description": "Group k3s patch updates", + "matchDatasources": ["github-releases"], + "matchPackageNames": ["k3s-io/k3s"], + "matchUpdateTypes": ["patch"], + "groupName": "k3s" + }, + { + "matchDatasources": ["github-releases"], + "matchFileNames": [".forgejo/workflows/**"], + "matchPackageNames": ["k3s-io/k3s"], + "matchUpdateTypes": ["major", "minor"], + "matchCurrentVersion": "<1.31", + "enabled": false + }, + { + "description": "prepare k3s", + "matchDatasources": ["custom.k3s"], + "rangeStrategy": "replace" + } + ], + "customDatasources": { + "k3s": { + "defaultRegistryUrlTemplate": "https://update.k3s.io/v1-release/channels", + "transformTemplates": [ + "($isVersion:=function($name){$contains($name,/^v\\d+.\\d+$/)};{\"releases\":[data[$isVersion(name)].{\"version\":latest}],\"sourceUrl\":\"https://github.com/k3s-io/k3s\",\"homepage\":\"https://k3s.io/\"})" + ] + } + }, + "customManagers": [ + { + "customType": "regex", + "fileMatch": [".forgejo/renovate/k3s.json"], + "matchStrings": [ + "matchCurrentVersion\": \"(?<\\d+\\.\\d+)\"" + ], + "depNameTemplate": "k3s", + "versioningTemplate": "npm", + "datasourceTemplate": "custom.k3s" + } + ] +} diff --git a/renovate.json b/renovate.json index 0905a94..9e09aef 100644 --- a/renovate.json +++ b/renovate.json @@ -1,6 +1,9 @@ { "$schema": "https://docs.renovatebot.com/renovate-schema.json", - "extends": ["forgejo-contrib/forgejo-renovate//base.json"], + "extends": [ + "forgejo-contrib/forgejo-renovate//base.json", + "forgejo-helm/forgejo-helm//.forgejo/renovate/k3s.json" + ], "assignees": ["viceice"], "baseBranches": ["main", "/^maint\\/.+/"], "packageRules": [ @@ -71,29 +74,6 @@ "matchUpdateTypes": ["digest"], "automerge": true }, - { - "description": "Separate minor and patch updates for k3s", - "matchDatasources": ["github-releases"], - "matchPackageNames": ["k3s-io/k3s"], - "separateMultipleMinor": true, - "separateMinorPatch": true, - "branchTopic": "{{{depNameSanitized}}}{{#if isMinor}}-minor{{/if}}-{{{newMajor}}}{{#if isPatch}}.{{{newMinor}}}{{/if}}.x{{#if isLockfileUpdate}}-lockfile{{/if}}", - "commitMessageSuffix": "{{#if isMinor}}(minor){{/if}}{{#if isPatch}}(patch){{/if}}" - }, - { - "description": "No automerge for k3s major and minor updates", - "matchDatasources": ["github-releases"], - "matchPackageNames": ["k3s-io/k3s"], - "matchUpdateTypes": ["major", "minor"], - "automerge": false - }, - { - "description": "Group k3s patch updates", - "matchDatasources": ["github-releases"], - "matchPackageNames": ["k3s-io/k3s"], - "matchUpdateTypes": ["patch"], - "groupName": "k3s" - }, { "description": "Use test scope for forgejo ci tests", "matchFileNames": ["ci/*.yaml"],