3
0
mirror of https://github.com/mastodon/chart synced 2025-05-18 04:53:21 +00:00

update renovate to use config.js and bump helm chart version going forward

This commit is contained in:
jessebot 2023-08-09 08:20:27 +02:00
parent 0a1bb29ee6
commit 3957a98417
3 changed files with 42 additions and 15 deletions

41
.github/config.js vendored Normal file
View File

@ -0,0 +1,41 @@
module.exports = {
branchPrefix: 'test-renovate/',
username: 'renovate-release',
gitAuthor: 'Renovate Bot <bot@renovateapp.com>',
platform: 'github',
includeForks: true,
dryRun: 'full',
repositories: ['jessebot/mastodon-helm-chart'],
extends: ['config:base'],
allowPostUpgradeCommandTemplating: true,
allowedPostUpgradeCommands: ['^.*'],
regexManagers: [
{
fileMatch: ['(^|/)Chart\\.yaml$'],
matchStrings: [
'#\\s?renovate: image=(?<depName>.*?)\\s?appVersion:\\s?\\"?(?<currentValue>[\\w+\\.\\-]*)',
],
datasourceTemplate: 'docker',
},
],
packageRules: [
{
matchManagers: ['helm-requirements', 'helm-values', 'regex'],
postUpgradeTasks: {
commands: [
`version=$(grep '^version:' {{{parentDir}}}/Chart.yaml | awk '{print $2}')
major=$(echo $version | cut -d. -f1)
minor=$(echo $version | cut -d. -f2)
patch=$(echo $version | cut -d. -f3)
minor=$(expr $minor + 1)
echo "Replacing $version with $major.$minor.$patch"
sed -i "s/^version:.*/version: $\{major\}.$\{minor\}.$\{patch\}/g" {{{parentDir}}}/Chart.yaml
cat {{{parentDir}}}/Chart.yaml
`,
],
},
fileFilters: ['**/Chart.yaml'],
executionMode: 'branch',
},
],
};

14
.github/renovate.json vendored
View File

@ -1,14 +0,0 @@
{
"repositories": [
"jessebot/mastodon-helm-chart"
],
"regexManagers": [
{
"datasourceTemplate": "docker",
"fileMatch": ["(^|/)Chart\\.yaml$"],
"matchStrings": [
"#\\s?renovate: image=(?<depName>.*?)\\s?appVersion:\\s?\\\"?(?<currentValue>[\\w+\\.\\-]*)\""
]
}
]
}

View File

@ -14,4 +14,4 @@ jobs:
uses: renovatebot/github-action@v39.0.1
with:
token: ${{ secrets.RENOVATE_TOKEN }}
configurationFile: .github/renovate.json
configurationFile: .github/config.js