Skip to content

Regex Manager Presets

regexManagers:dockerfileVersions

Update _VERSION variables in Dockerfiles.

{
  "customManagers": [
    {
      "customType": "regex",
      "fileMatch": [
        "(^|/|\\.)([Dd]ocker|[Cc]ontainer)file$",
        "(^|/)([Dd]ocker|[Cc]ontainer)file[^/]*$"
      ],
      "matchStrings": [
        "# renovate: datasource=(?<datasource>[a-z-.]+?) depName=(?<depName>[^\\s]+?)(?: (lookupName|packageName)=(?<packageName>[^\\s]+?))?(?: versioning=(?<versioning>[^\\s]+?))?(?: extractVersion=(?<extractVersion>[^\\s]+?))?(?: registryUrl=(?<registryUrl>[^\\s]+?))?\\s(?:ENV|ARG) .+?_VERSION[ =]\"?(?<currentValue>.+?)\"?\\s"
      ]
    }
  ]
}

regexManagers:githubActionsVersions

Update _VERSION environment variables in GitHub Action files.

{
  "customManagers": [
    {
      "customType": "regex",
      "fileMatch": [
        "(^|/)(workflow-templates|\\.(?:github|gitea|forgejo)/(?:workflows|actions))/.+\\.ya?ml$",
        "(^|/)action\\.ya?ml$"
      ],
      "matchStrings": [
        "# renovate: datasource=(?<datasource>[a-z-.]+?) depName=(?<depName>[^\\s]+?)(?: (?:lookupName|packageName)=(?<packageName>[^\\s]+?))?(?: versioning=(?<versioning>[^\\s]+?))?(?: extractVersion=(?<extractVersion>[^\\s]+?))?\\s+[A-Za-z0-9_]+?_VERSION\\s*:\\s*[\"']?(?<currentValue>.+?)[\"']?\\s"
      ]
    }
  ]
}

regexManagers:gitlabPipelineVersions

Update _VERSION environment variables in GitLab pipeline file.

{
  "customManagers": [
    {
      "customType": "regex",
      "fileMatch": [
        "\\.gitlab-ci\\.ya?ml$"
      ],
      "matchStrings": [
        "# renovate: datasource=(?<datasource>[a-z-.]+?) depName=(?<depName>[^\\s]+?)(?: (?:packageName)=(?<packageName>[^\\s]+?))?(?: versioning=(?<versioning>[^\\s]+?))?(?: extractVersion=(?<extractVersion>[^\\s]+?))?\\s+[A-Za-z0-9_]+?_VERSION\\s*:\\s*[\"']?(?<currentValue>.+?)[\"']?\\s"
      ]
    }
  ]
}

regexManagers:helmChartYamlAppVersions

Update appVersion value in Helm chart Chart.yaml.

{
  "customManagers": [
    {
      "customType": "regex",
      "datasourceTemplate": "docker",
      "fileMatch": [
        "(^|/)Chart\\.yaml$"
      ],
      "matchStrings": [
        "#\\s*renovate: image=(?<depName>.*?)\\s+appVersion:\\s*[\"']?(?<currentValue>[\\w+\\.\\-]*)"
      ]
    }
  ]
}

regexManagers:mavenPropertyVersions

Update *.version properties in pom.xml files.

{
  "customManagers": [
    {
      "customType": "regex",
      "datasourceTemplate": "{{#if datasource}}{{{datasource}}}{{else}}maven{{/if}}",
      "fileMatch": [
        "(^|/)pom\\.xml$"
      ],
      "matchStrings": [
        "<!--\\s?renovate:( datasource=(?<datasource>[a-z-.]+?))? depName=(?<depName>[^\\s]+?)(?: packageName=(?<packageName>[^\\s]+?))?(?: versioning=(?<versioning>[^\\s]+?))?(?: extractVersion=(?<extractVersion>[^\\s]+?))?\\s+-->\\s+<.+\\.version>(?<currentValue>.+)<\\/.+\\.version>"
      ],
      "versioningTemplate": "{{#if versioning}}{{{versioning}}}{{/if}}"
    }
  ]
}

regexManagers:tfvarsVersions

Update *_version variables in .tfvars files.

{
  "customManagers": [
    {
      "customType": "regex",
      "fileMatch": [
        ".+\\.tfvars$"
      ],
      "matchStrings": [
        "#\\s*renovate: datasource=(?<datasource>.*?) depName=(?<depName>.*?)( versioning=(?<versioning>.*?))?(?: extractVersion=(?<extractVersion>.*?))?\\s.*?_version\\s*=\\s*\"(?<currentValue>.*)\""
      ],
      "versioningTemplate": "{{#if versioning}}{{{versioning}}}{{/if}}"
    }
  ]
}