Skip to content

Commit

Permalink
renovate: fix Go postUpgradeTasks for stable branches
Browse files Browse the repository at this point in the history
We recently switched to using the toolchain directive on the main which
broke Go updates postUpgradeTasks on stable branches (see #2494 or
commit bee5a74).

Signed-off-by: Mahe Tardy <[email protected]>
  • Loading branch information
mtardy committed Jun 6, 2024
1 parent 0159ade commit f03102c
Showing 1 changed file with 27 additions and 0 deletions.
27 changes: 27 additions & 0 deletions .github/renovate.json5
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@
"^make vendor$",
"^make -C install/kubernetes$",
"^go mod vendor$",
"^install-tool golang \\$\\(grep -oP '\\^go \\\\K\\.\\+' go\\.mod\\)$",
"^install-tool golang \\$\\(grep -oP '\\^toolchain go\\\\K\\.\\+' go\\.mod\\)$"
],
// repository configuration
Expand Down Expand Up @@ -212,11 +213,16 @@
}
},
{
// main branch is using the new toolchain directive
"groupName": "Go",
"matchPackageNames": [
"go",
"docker.io/library/golang"
],
"matchBaseBranches": [
"v1.0",
"v1.1",
],
// postUpgradeTasks is only for when the Go module directives are bumped
"postUpgradeTasks": {
// We need to trigger a golang install manually here because in some
Expand All @@ -227,6 +233,27 @@
"executionMode": "branch"
},
},
{
// stable branches are using the go directive
"groupName": "Go",
"matchPackageNames": [
"go",
"docker.io/library/golang"
],
"matchBaseBranches": [
"v1.0",
"v1.1",
],
// postUpgradeTasks is only for when the Go module directives are bumped
"postUpgradeTasks": {
// We need to trigger a golang install manually here because in some
// cases it might not be preinstalled, see:
// https://github.com/renovatebot/renovate/discussions/23485
"commands": ["install-tool golang $(grep -oP '^go \\K.+' go.mod)", "make vendor"],
"fileFilters": ["**/**"],
"executionMode": "branch"
},
},
{
// Group golangci-lint updates to overrule grouping of version updates in
// the GHA files. Without this, golangci-lint updates are not in sync for
Expand Down

0 comments on commit f03102c

Please sign in to comment.