-
Notifications
You must be signed in to change notification settings - Fork 41
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
add custom versioning matchers (#305)
* add custom versioning matchers * keep it simple for now * add few more * do some migrations, based on renovate logs suggestion * use function instead of arrow function, to be on the safe side * add scheduling
- Loading branch information
Showing
2 changed files
with
45 additions
and
3 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,7 @@ | ||
module.exports = { | ||
extends: [], | ||
// https://docs.renovatebot.com/self-hosted-configuration/#dryrun | ||
dryRun: false, | ||
dryRun: null, | ||
// https://docs.renovatebot.com/configuration-options/#gitauthor | ||
gitAuthor: "bugclerk <[email protected]>", | ||
// https://docs.renovatebot.com/self-hosted-configuration/#onboarding | ||
|
@@ -17,9 +17,10 @@ module.exports = { | |
// https://docs.renovatebot.com/self-hosted-configuration/#allowedpostupgradecommands | ||
// TODO: Restrict this. | ||
allowedPostUpgradeCommands: ["^.*"], | ||
enabledManagers: ["regex", "github-actions"], | ||
enabledManagers: ["custom.regex", "github-actions"], | ||
customManagers: [ | ||
{ | ||
customType: "regex", | ||
// Match only ix_values.yaml files in the ix-dev directory | ||
fileMatch: ["^ix-dev/.*/ix_values\\.yaml$"], | ||
// Matches the repository name and the tag of each image | ||
|
@@ -32,7 +33,7 @@ module.exports = { | |
], | ||
packageRules: [ | ||
{ | ||
matchManagers: ["regex"], | ||
matchManagers: ["custom.regex"], | ||
matchDatasources: ["docker"], | ||
postUpgradeTasks: { | ||
// What to "git add" after the commands are run | ||
|
@@ -64,5 +65,44 @@ module.exports = { | |
groupName: "updates-patch-minor", | ||
labels: ["patch"], | ||
}, | ||
// Custom versioning matching | ||
customVersioning( | ||
// There are tags with date format (24.08.0), but newer versions are semver | ||
"^(?<major>\\d{2})\\.(?<minor>\\d+)\\.(?<patch>\\d+)$", | ||
["linuxserver/deluge", "linuxserver/diskover"] | ||
), | ||
customVersioning( | ||
// Older versions was 20220101 and newer versions are 240101 | ||
"^(?<major>\\d{2})(?<minor>\\d{2})(?<patch>\\d{2})$", | ||
["photoprism/photoprism"] | ||
), | ||
customVersioning( | ||
// RELEASE.2024-08-26T15-33-07Z | ||
"^RELEASE\\.(?<major>\\d+)-(?<minor>\\d+)-(?<patch>\\d+)T\\d+-\\d+-\\d+Z$", | ||
["minio/minio"] | ||
), | ||
customVersioning( | ||
// version-6.0.0 | ||
"^version-(?<major>\\d+)\\.(?<minor>\\d+)\\.(?<patch>\\d+)$", | ||
["fireflyiii/core", "fireflyiii/data-importer"] | ||
), | ||
customVersioning( | ||
// 2024-08-29 | ||
"^(?<major>\\d+)-(?<minor>\\d+)-(?<patch>\\d+)$", | ||
["alexta69/metube"] | ||
), | ||
customVersioning( | ||
// 2.462.1-jdk17 | ||
"^(?<major>\\d+)\\.(?<minor>\\d+)-jdk17", | ||
["jenkins/jenkins"] | ||
), | ||
], | ||
}; | ||
|
||
function customVersioning(versioningRegex, packages) { | ||
return { | ||
matchDatasources: ["docker"], | ||
versioning: `regex:${versioningRegex}`, | ||
matchPackageNames: packages, | ||
}; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -2,6 +2,8 @@ name: Renovate | |
|
||
on: | ||
workflow_dispatch: | ||
schedule: | ||
- cron: "0 12 * * *" | ||
|
||
concurrency: | ||
group: renovate | ||
|