Skip to content

Commit

Permalink
update to use config.js instead of renovate.json
Browse files Browse the repository at this point in the history
  • Loading branch information
jessebot committed Aug 8, 2023
1 parent 9dad2ba commit 64c0c6c
Show file tree
Hide file tree
Showing 3 changed files with 42 additions and 15 deletions.
41 changes: 41 additions & 0 deletions .github/config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
module.exports = {
branchPrefix: 'test-renovate/',
username: 'renovate-release',
gitAuthor: 'Renovate Bot <[email protected]>',
platform: 'github',
includeForks: true,
dryRun: 'full',
repositories: ['jessebot/coturn-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 changes: 0 additions & 14 deletions .github/renovate.json

This file was deleted.

2 changes: 1 addition & 1 deletion .github/workflows/renovatebot.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,4 +14,4 @@ jobs:
uses: renovatebot/[email protected]
with:
token: ${{ secrets.RENOVATE_TOKEN }}
configurationFile: .github/renovate.json
configurationFile: .github/config.js

0 comments on commit 64c0c6c

Please sign in to comment.