Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Upgrade Golang versions automatically when new patch version is released #86

Merged
merged 3 commits into from
Nov 25, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
37 changes: 31 additions & 6 deletions renovate-base.json5
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,8 @@
// Exclude any dependencies which are pre-1.0.0 because those can make breaking changes at any time
// according to the SemVer spec.
"matchCurrentVersion": "!/^(0|v0)/",
// Exclude golang dependency so golang version in Docker, gomod files is not auto-merged.
"excludeDepNames": ["golang", "go"],
// Renovate will do the following when detecting a new dependency bump:
"automerge": true,
"automergeType": "branch",
Expand All @@ -48,8 +50,8 @@
// Exclude any dependencies which are pre-1.0.0 because those can make breaking changes at any time
// according to the SemVer spec.
"matchCurrentVersion": "!/^(0|v0)/",
// Exclude golang dependency so golang version in Docker files is not auto-merged.
"excludeDepNames": ["golang"],
// Exclude golang dependency so golang version in Docker, gomod files is not auto-merged.
"excludeDepNames": ["golang", "go"],
"automerge": true,
"automergeType": "branch",
"pruneBranchAfterAutomerge": true
Expand All @@ -58,15 +60,38 @@
// go.mod golang-version is not updated by default, check <https://github.com/renovatebot/renovate/issues/16715>.
// Enable golang version bumps in 'go.mod' but disable auto-merge.
"matchDatasources": ["golang-version"],
"rangeStrategy": "bump",
// The packageRules are overrided/merged, therefore this rule needs to set automerge to false explicitly.
"automerge": false,
"rangeStrategy": "bump"
},
{
// Group the Dockerfile go bump ("golang" package) and the go.mod go bump ("go" package) together
// check <https://docs.renovatebot.com/configuration-options/#groupname> for details about grouping.
// Group golang & go packages minor, major versions with groupName "golang version"
// Disabled automerge for golang & go packages minor, major version updates
"matchPackageNames": ["golang", "go"],
"groupName": "golang version"
"matchUpdateTypes": ["minor", "major"],
"groupName": "golang version",
"automerge": false,
"pruneBranchAfterAutomerge": true
},
{
// go.mod golang-version is not updated by default, check <https://github.com/renovatebot/renovate/issues/16715>.
// Enable golang version bumps in 'go.mod'.
"matchDatasources": ["golang-patch-version"],
"rangeStrategy": "bump"
},
{
// Group the Dockerfile go bump ("golang" package) and the go.mod go bump ("go" package) together
// check <https://docs.renovatebot.com/configuration-options/#groupname> for details about grouping.
// Group golang & go packages patch versions with groupName "golang patch version"
// Enabled automerge for golang & go packages patch version updates
"description": "Automerge go patch version updates",
"matchPackageNames": ["golang", "go"],
"matchUpdateTypes": ["patch"],
"groupName": "golang patch version",
"automerge": true,
"pruneBranchAfterAutomerge": true,
"platformAutomerge": true
}

]
}
Loading