cheat-sheets

Renovate

Renovate opens pull requests that update dependencies (Docker images, GitHub Actions, npm, Go, Compose files, Helm charts, Terraform providers and more) and can automerge the safe ones. It is configured with a JSON config file in each repo, usually extending a shared preset. Updated Actions versions are covered in GitHub Actions, Woodpecker steps in Woodpecker CI, image tags in CI Docker Builds and Docker-Compose.

Documentation: Renovate docs, Configuration options, Preset reference, Config validation


Minimal renovate.json #

Renovate looks for renovate.json, renovate.json5, .github/renovate.json, .gitlab/renovate.json, .renovaterc and a renovate key in package.json.

json
{
  "$schema": "https://docs.renovatebot.com/renovate-schema.json",
  "extends": ["config:recommended"]
}

config:recommended enables the Dependency Dashboard, groups common monorepo and workspace packages, and enables sensible defaults.

Shared Preset Pattern #

Keep one preset repo and extend it everywhere. This repo’s renovate.json is only:

json
{
  "$schema": "https://docs.renovatebot.com/renovate-schema.json",
  "extends": ["github>modem7/renovate-config"]
}

The preset repo (modem7/renovate-config) holds default.json (extends shared), shared.json, automergePatch.json, automergeDigest.json and docker.json. A repo can opt in to extras:

json
{
  "extends": [
    "github>modem7/renovate-config",
    "github>modem7/renovate-config:automergePatch",
    "github>modem7/renovate-config:docker"
  ]
}
PRESET SYNTAXMEANING
config:recommendedBuilt-in preset
:automergeMinorBuilt-in “default” preset (leading colon); also :automergePatch, :automergeDigest, :automergeAll, :maintainLockFilesWeekly
schedule:weeklyBuilt-in schedule preset; others include schedule:nonOfficeHours, schedule:earlyMondays, schedule:monthly
helpers:pinGitHubActionDigestsPin Actions to commit SHAs and keep the version comment updated
docker:pinDigestsPin Docker images to digests
github>OWNER/REPOdefault.json of a GitHub repo
github>OWNER/REPO:NAMENAME.json in that repo
github>OWNER/REPO:NAME#v1.0.0Pinned to a tag
gitlab>GROUP/PROJECT, local>OWNER/REPOSame idea for GitLab, or the platform you are on

Common Top-Level Options #

OPTIONDESCRIPTION
extendsList of presets, applied in order (later wins)
scheduleWhen Renovate may create branches/PRs, e.g. ["before 6am on monday"]
timezoneIANA zone used by schedule, e.g. Europe/London
labels / addLabelsLabels on PRs
assignees / reviewersWho gets assigned or asked to review
prConcurrentLimitMax open PRs (0 = unlimited); prHourlyLimit for rate
automergeMerge when checks pass
automergeTypepr (default) or branch
platformAutomergeUse GitHub/GitLab native auto-merge when allowed
ignoreTestsAutomerge even with no CI configured
minimumReleaseAgeWait N days after release before proposing (e.g. 3 days), a defence against bad or malicious releases
dependencyDashboardMaintain an issue listing all updates
separateMajorMinorSeparate PRs for major and minor (default true)
enabledManagersRestrict to listed managers
ignorePathsPaths to skip
rebaseWhenauto, behind-base-branch, conflicted, never
semanticCommitsenabled / disabled / auto
lockFileMaintenancePeriodically refresh lock files
pinDigestsPin Docker/Actions digests
commitMessagePrefix, commitMessageTopicPR/commit title formatting

packageRules #

Rules are evaluated top to bottom; later matching rules override earlier ones. All match* conditions in a rule must hold.

json
{
  "packageRules": [
    {
      "description": "Automerge minor and patch for dev dependencies",
      "matchDepTypes": ["devDependencies"],
      "matchUpdateTypes": ["minor", "patch"],
      "automerge": true
    },
    {
      "description": "Group all GitHub Actions updates",
      "matchManagers": ["github-actions"],
      "groupName": "github actions"
    },
    {
      "description": "Majors need a human and a wait",
      "matchUpdateTypes": ["major"],
      "automerge": false,
      "minimumReleaseAge": "7 days",
      "addLabels": ["major"]
    },
    {
      "description": "Hold back one image",
      "matchPackageNames": ["postgres"],
      "allowedVersions": "<18"
    },
    {
      "description": "Never touch these",
      "matchPackageNames": ["/^internal\\//"],
      "enabled": false
    }
  ]
}
MATCHERMATCHES
matchManagersManager name: github-actions, dockerfile, docker-compose, npm, gomod, woodpecker, helm-values, terraform …
matchUpdateTypesmajor, minor, patch, pin, digest, pinDigest, lockFileMaintenance, rollback, bump
matchPackageNamesPackage names, with globs or /regex/
matchDepNamesDependency names as shown in the PR
matchDepTypese.g. dependencies, devDependencies, action
matchFileNamesFiles the dependency was found in (globs)
matchCurrentVersionCurrent version range
matchBaseBranchesTarget branches

Actions on a match: automerge, enabled, groupName, schedule, labels, addLabels, assignees, allowedVersions, versioning, pinDigests, minimumReleaseAge, extends (apply a preset)

Automerge #

json
{
  "extends": [":automergeDigest", ":automergePatch"],
  "platformAutomerge": false,
  "packageRules": [
    {
      "matchManagers": ["github-actions", "woodpecker"],
      "matchUpdateTypes": ["minor", "patch", "digest"],
      "automerge": true
    }
  ]
}
  • Automerge needs required status checks to pass, so give the repo CI (see CI Recipes) or set ignoreTests.
  • platformAutomerge: true uses GitHub’s own auto-merge and requires branch protection with required checks; false makes Renovate merge on its next run.
  • Run Renovate often enough (hourly) for automerge to complete; each run only merges a PR that is up to date and green.
  • Keep majors manual. Digest and patch updates of CI plumbing are good automerge candidates.

Schedules #

json
{
  "timezone": "Europe/London",
  "schedule": ["before 6am on monday"],
  "packageRules": [
    {
      "matchUpdateTypes": ["digest"],
      "extends": ["schedule:nonOfficeHours"]
    }
  ],
  "lockFileMaintenance": { "enabled": true, "schedule": ["before 4am on the first day of the month"] }
}

Schedules use “later” syntax (after 10pm every weekday, every weekend). Renovate still has to run during that window. Items outside the schedule appear in the Dependency Dashboard and can be forced with its checkbox.

Custom (Regex) Managers #

Use these for versions in arbitrary files. A comment above the value tells Renovate where to look it up.

yaml
# compose.yaml / workflow / Dockerfile
env:
  NODE_VERSION: 22.12.0 # renovate: datasource=node-version depName=node
  # or
ARG S6_OVERLAY_VERSION=3.2.0.2
json
{
  "customManagers": [
    {
      "customType": "regex",
      "description": "Versions annotated with a renovate comment",
      "managerFilePatterns": ["/(^|/)Dockerfile$/", "/^\\.github/workflows/.+\\.ya?ml$/"],
      "matchStrings": [
        "[A-Z_]+_VERSION[=:] ?(?<currentValue>\\S+) # renovate: datasource=(?<datasource>\\S+) depName=(?<depName>\\S+)"
      ]
    },
    {
      "customType": "regex",
      "description": "Fixed upstream project via templates",
      "managerFilePatterns": ["/^Dockerfile$/"],
      "matchStrings": ["ARG S6_OVERLAY_VERSION=(?<currentValue>[0-9.]+)"],
      "datasourceTemplate": "github-releases",
      "packageNameTemplate": "just-containers/s6-overlay",
      "extractVersionTemplate": "^v(?<version>.*)$"
    }
  ]
}
FIELDDESCRIPTION
customTyperegex (or jsonata)
managerFilePatternsFiles to scan; regex between / / or globs (formerly fileMatch, which is auto-migrated)
matchStringsRegexes with named groups currentValue, datasource, depName / packageName
datasourceTemplate, depNameTemplate, packageNameTemplateFixed values instead of capture groups; use {{{ }}} to avoid escaping
versioningTemplatesemver, loose, docker, regex:...
extractVersionTemplateStrip a prefix like v from tags

Common datasources: github-releases, github-tags, docker, npm, pypi, go, helm, node-version.

The modem7/renovate-config:shared preset already ships two regex managers for version: and *_VERSION: values annotated with # renovate: datasource=... depName=... in .github/workflows/ and .woodpecker/ files.

Dependency Dashboard #

A GitHub/GitLab issue titled “Dependency Dashboard” lists every pending, open, rate-limited and errored update.

  • Tick a box to force a PR now (bypasses schedule and rate limits) or to retry a failed one.
  • Tick “Check this box to trigger a request for Renovate to run again” to rerun without waiting for the schedule.
  • Detected dependencies are listed for debugging “why isn’t it updating X?”.
  • Require approval for risky updates with "dependencyDashboardApproval": true in a packageRules entry (e.g. majors).

Validating Config #

bash
npx --yes --package renovate -- renovate-config-validator            # checks the default config files
npx --yes --package renovate -- renovate-config-validator --strict   # also fails if the config needs migration

Run it with no filename for a normal repo: passing a filename makes the validator treat that file as global self-hosted config (use that form only for a self-hosted config.js). Run it in CI on PRs that touch the config, and as a pre-commit hook.

Self-Hosted vs the Mend Renovate App #

MEND RENOVATE APP (GitHub)SELF-HOSTED
SetupInstall the GitHub app on reposRun the renovate/renovate container or npx renovate on a schedule
RunsHosted by MendYour cron, GitHub Action, Woodpecker cron or K8s CronJob
PlatformsGitHubGitHub, GitLab, Gitea/Forgejo (Gitea (and Forgejo)), Bitbucket, Azure DevOps
ControlPer-repo config onlyGlobal config, private registries, any schedule
MaintenanceNoneYou upgrade it and manage the token

Self-hosted run with Docker:

bash
docker run --rm \
  -e RENOVATE_TOKEN="$RENOVATE_TOKEN" \
  -e RENOVATE_PLATFORM=gitea \
  -e RENOVATE_ENDPOINT=https://git.example.com/api/v1 \
  -e RENOVATE_AUTODISCOVER=true \
  -e LOG_LEVEL=debug \
  renovate/renovate:<VERSION>
VARIABLEDESCRIPTION
RENOVATE_TOKENBot account token (repo, PR and issue scopes)
RENOVATE_PLATFORMgithub, gitlab, gitea, bitbucket, azure …
RENOVATE_ENDPOINTAPI URL for self-hosted forges
RENOVATE_AUTODISCOVERProcess every repo the token can access
RENOVATE_REPOSITORIESExplicit list instead of autodiscover
RENOVATE_GIT_AUTHORCommit author, e.g. Renovate Bot <bot@example.com>
RENOVATE_ONBOARDING_CONFIGConfig PR content for new repos
RENOVATE_GITHUB_COM_TOKENA github.com token so changelogs and release lookups are not rate limited
LOG_LEVELinfo, debug (use debug when diagnosing)

Run it on a schedule from GitHub Actions with the official action (see GitHub Actions) or from a Woodpecker cron job (Woodpecker CI) using the same container.

Troubleshooting #

SYMPTOMCAUSE AND FIX
No onboarding PRRepo not enabled for the app, or token lacks access; check the app’s repo selection
Nothing updatesOutside schedule; rate limited (prConcurrentLimit); enabledManagers too narrow; look at the Dependency Dashboard and the debug log
Dependency not detectedNo manager matches the file; add a custom manager or widen managerFilePatterns
Automerge never happensRequired checks not passing or not configured, branch protection blocks it, or platformAutomerge mismatch
PR created but CI does not runBot PRs from a GitHub Actions run with GITHUB_TOKEN do not trigger workflows; use a PAT/app token
Config error issueRun the validator; a packageRules entry mixing conflicting options is a common cause
Version is not parsed (v-prefix, unusual tags)Set versioning or extractVersion on a rule (see modem7/renovate-config:shared for the GitHub Actions v-prefix case)
Too many PRs at onceSet prConcurrentLimit, group with groupName, or schedule weekly
Wrong release proposed (unstable tag)Set allowedVersions or ignoreUnstable, use minimumReleaseAge
Search all sheets

Tip: / or Ctrl/Cmd+K to open, Esc to close.