diff --git a/.github/renovate.json5 b/.github/renovate.json5 index 7681fc21..c93063ea 100644 --- a/.github/renovate.json5 +++ b/.github/renovate.json5 @@ -10,11 +10,11 @@ "baseBranchPatterns": ["main"], "ignorePaths": ["design/**"], "postUpdateOptions": ["gomodTidy"], - // By default renovate will auto detect whether semantic commits have been used + // By default, renovate will auto-detect whether semantic commits have been used // in the recent history and comply with that, we explicitly disable it "semanticCommits": "disabled", // All PRs should have a label - "labels": ["automated"], + "labels": ["automated", "renovate"], "customManagers": [ { // We want a PR to bump Go versions used through env variables in any Github @@ -23,19 +23,24 @@ "description": "Bump Go version in workflows", "managerFilePatterns": ["/^\\.github\\/workflows\\/[^/]+\\.ya?ml$/"], "matchStrings": [ - "GO_VERSION: '(?.*?)'\\n" + "GO_VERSION: ['\"]?(?.*?)['\"]?\\n" ], "datasourceTemplate": "golang-version", - "depNameTemplate": "golang" + "depNameTemplate": "go", + "packageNameTemplate": "go", + "depTypeTemplate": "golang" }, { // We want a PR to bump golangci-lint versions used through env variables in // any Github Actions, taking it from the official Github repository tags. "customType": "regex", "description": "Bump golangci-lint version in workflows", - "managerFilePatterns": ["/^\\.github\\/workflows\\/[^/]+\\.ya?ml$/"], + "managerFilePatterns": ["/^\\.github\\/workflows\\/[^/]+\\.ya?ml$/", "/^Makefile$/"], "matchStrings": [ - "GOLANGCI_VERSION: '(?.*?)'\\n" + "GOLANGCI_VERSION: ['\"]?(?.*?)['\"]?\\n", + "GOLANGCILINT_VERSION: ['\"]?(?.*?)['\"]?\\n", + "GOLANGCILINT_VERSION \\??= (?.*?)\\n", + "GOLANGCI_VERSION \\??= (?.*?)\\n" ], "datasourceTemplate": "github-releases", "depNameTemplate": "golangci/golangci-lint" @@ -47,35 +52,11 @@ "description": "Bump Docker Buildx version in workflows", "managerFilePatterns": ["/^\\.github\\/workflows\\/[^/]+\\.ya?ml$/"], "matchStrings": [ - "DOCKER_BUILDX_VERSION: '(?.*?)'\\n" + "DOCKER_BUILDX_VERSION: ['\"]?(?.*?)['\"]?\\n" ], "datasourceTemplate": "github-releases", "depNameTemplate": "docker/buildx" }, - { - // We want a PR to bump golangci-lint versions used through make variables in - // the Makefile, taking it from the official Github repository releases. - "customType": "regex", - "description": "Bump golangci-lint version in the Makefile", - "managerFilePatterns": [ - "/^Makefile$/", - "/^\\.github\\/workflows\\/[^/]+\\.ya?ml$/" - ], - "matchStrings": ["GOLANGCILINT_VERSION \\??= (?.*?)\\n"], - "datasourceTemplate": "github-releases", - "depNameTemplate": "golangci/golangci-lint", - "extractVersionTemplate": "^(?.*)$" - }, - { - // We want a PR to bump up CLI versions used through make variables in - // the Makefile, taking it from the official Github repository releases. - "customType": "regex", - "description": "Bump up CLI version in the Makefile", - "managerFilePatterns": ["/^Makefile$/"], - "matchStrings": ["UP_VERSION \\??= (?.*?)\\n"], - "datasourceTemplate": "github-releases", - "depNameTemplate": "upbound/up" - }, { // We want a PR to bump uptest versions used through make variables in // the Makefile, taking it from the official Github repository releases. @@ -104,8 +85,7 @@ "managerFilePatterns": ["/^Makefile$/"], "matchStrings": ["CROSSPLANE_VERSION \\??= (?.*?)\\n"], "datasourceTemplate": "github-releases", - "depNameTemplate": "crossplane/crossplane", - "extractVersionTemplate": "^(?.*)$" + "depNameTemplate": "crossplane/crossplane" }, { // We want a PR to bump Crossplane CLI versions used through make variables in @@ -113,7 +93,7 @@ "customType": "regex", "description": "Bump Crossplane CLI version in the Makefile", "managerFilePatterns": ["/^Makefile$/"], - "matchStrings": ["CROSSPLANE_CLI_VERSION ??= (?.*?)\\n"], + "matchStrings": ["CROSSPLANE_CLI_VERSION \\??= (?.*?)\\n"], "datasourceTemplate": "github-releases", "depNameTemplate": "crossplane/crossplane" } @@ -130,7 +110,7 @@ }, { // We want a single PR for all the patches bumps of kubernetes related - // dependencies, as most of the times these are all strictly related. + // dependencies, as most of the time these are all strictly related. "matchDatasources": ["go"], "groupName": "kubernetes patches", "matchUpdateTypes": ["patch", "digest"], @@ -141,13 +121,22 @@ // dependencies. "matchDatasources": ["go"], "matchUpdateTypes": ["major", "minor"], - "matchPackageNames": ["k8s.io{/,}**", "sigs.k8s.io{/,}**"] + "matchPackageNames": ["k8s.io{/,}**", "sigs.k8s.io{/,}**"], + "dependencyDashboardApproval": true, + }, + { + // We want dedicated PRs for each minor and major bumps to crossplane related + // go dependencies. + "matchDatasources": ["go"], + "matchUpdateTypes": ["major", "minor"], + "matchPackageNames": ["github.com/crossplane{/,}**"], + "dependencyDashboardApproval": true, }, { // We want dedicated PRs for each bump to non-kubernetes Go dependencies, but // only if there are known vulnerabilities in the current version. "matchDatasources": ["go"], - "matchPackageNames": ["*", "!k8s.io{/,}**", "!sigs.k8s.io{/,}**"], + "matchPackageNames": ["*", "!k8s.io{/,}**", "!sigs.k8s.io{/,}**", "!github.com/crossplane{/,}**"], "enabled": false, "matchUpdateTypes": ["major"] }, @@ -156,7 +145,7 @@ // dependencies, but only if there are known vulnerabilities in the current // version. "matchDatasources": ["go"], - "matchPackageNames": ["*", "!k8s.io{/,}**", "!sigs.k8s.io{/,}**"], + "matchPackageNames": ["*", "!k8s.io{/,}**", "!sigs.k8s.io{/,}**", "!github.com/crossplane{/,}**"], "enabled": false, "matchUpdateTypes": ["minor", "patch", "digest"], "groupName": "all non-major go dependencies" @@ -180,10 +169,30 @@ "groupName": "golangci-lint versions in CI", "groupSlug": "golangci-lint-in-ci" }, + { + // Allow bumping the go version directive at go.mod + "matchDatasources": ["golang-version"], + "matchManagers": ["gomod"], + "matchDepNames": ["go"], + "matchDepTypes": ["golang"], + "rangeStrategy": "bump", + }, + { + // Single PR for bumping Go version at the CI env vars and go.mod + "matchDatasources": ["golang-version"], + "matchPackageNames": ["go"], + "matchManagers": ["gomod", "custom.regex"], + "matchDepNames": ["go"], + "matchDepTypes": ["golang"], + "separateMinorPatch": true, + "groupName": "golang versions", + "groupSlug": "golang-versions", + "enabled": true + }, { // We want dedicated PRs for each major bump to Github Actions "matchDepTypes": ["action"], "pinDigests": true } - ] -} \ No newline at end of file + ], +}