{
  "$schema": "https://docs.renovatebot.com/renovate-schema.json",
  "extends": [
    "config:recommended",
    "default:automergeDigest",
    "default:automergeBranchPush",
    "docker:enableMajor",
    "docker:pinDigests",
    "group:monorepos"
  ],
  "rebaseWhen": "auto",
  "dependencyDashboard": true,
  "labels": [
    "dependency"
  ],
  "commitMessagePrefix": "⬆️",
  "commitMessageTopic": "{{depName}}",
  "enabledManagers": [
    "pip_requirements",
    "dockerfile",
    "gitlabci",
    "regex"
  ],
  "pip_requirements": {
    "fileMatch": [
      "(^|/)[\\w-]*requirements(-\\w+)?\\.(txt|pip)$",
      "^src/requirements/\\w+\\.(txt|pip)$"
    ]
  },
  "regexManagers": [
    {
      "fileMatch": ["(^|/)[\\w-.]*[Dd]ockerfile$"],
      "matchStringsStrategy": "any",
      "matchStrings": [
        "ARG BUILD_FROM=(?<depName>.*?):(?<currentValue>.*?)\\s+",
        "ARG BASE_IMAGE_NAME=(?<depName>.*?):(?<currentValue>.*?)\\s+(ARG )?BASE_IMAGE_DIGEST=(?<currentDigest>.*?)\\s"
      ],
      "datasourceTemplate": "docker",
      "versioningTemplate": "docker"
    },
    {
      "fileMatch": ["(^|/)[\\w-.]*[Dd]ockerfile$"],
      "matchStringsStrategy": "any",
      "matchStrings": [
        "(#\\s*renovate:\\s*srcname=(?<srcname>.*?)( datasource=(?<datasource>.*?))?( versioning=(?<versioning>.*?))?)?\\s+(?<package>[a-z0-9][a-z0-9-.]+)=(?<currentValue>[a-z0-9-:_+~.]+)\\s+"
      ],
      "datasourceTemplate": "repology",
      "depNameTemplate": "{{#if datasource}}{{{datasource}}}{{else}}ubuntu_24_04{{/if}}/{{#if srcname}}{{{srcname}}}{{else}}{{{package}}}{{/if}}",
      "versioningTemplate": "{{#if versioning}}{{{versioning}}}{{else}}deb{{/if}}"
    }
  ],
  "packageRules": [
    {
      "matchPackagePatterns": ["ubuntu_\\d\\d_\\d\\d/build-essential"],
      "matchManagers": ["regex"],
      "enabled": false
    },
    {
      "matchPackagePatterns": ["ubuntu_\\d\\d_\\d\\d/.*"],
      "matchManagers": ["regex"],
      "matchUpdateTypes": ["minor", "patch"],
      "automerge": true,
      "automergeType": "branch"
    },
    {
      "groupName": "docker core image",
      "matchPaths": [
        "docker/Dockerfile"
      ]
    },
    {
      "groupName": "docker tileserver image",
      "matchPaths": [
        "docker/tileserver.dockerfile"
      ]
    },
    {
      "groupName": "python development dependencies",
      "matchPaths": [
        "src/requirements/dev.txt"
      ]
    },
    {
      "groupName": "python ASGI server dependencies",
      "matchPaths": [
        "src/requirements/server-asgi.txt"
      ]
    },
    {
      "groupName": "python tile-server dependencies",
      "matchPaths": [
        "src/requirements-tileserver.txt"
      ]
    }
  ],
  "lockFileMaintenance": {
    "enabled": true,
    "automerge": true,
    "automergeType": "branch"
  },
  "ignoreTests": true
}
