{
  "$schema": "https://docs.renovatebot.com/renovate-schema.json",
  "extends": [
    "config:best-practices"
  ],
  "automerge": true,
  "github-actions": {
    "enabled": false
  },
  "nix": {
    "enabled": true,
    "lockFileMaintenance": {
      "enabled": true,
      "commitMessageAction": "update",
      "commitMessageTopic": "Nix flake lock"
    }
  },
  "customManagers": [
    {
      "customType": "regex",
      "managerFilePatterns": [
        "/(^|/|\\.)Dockerfile$/",
        "/(^|/)Dockerfile[^/]*$/"
      ],
      "matchStringsStrategy": "recursive",
      "matchStrings": [
        "FROM\\s*.*?alpine[.:]?(?<alpineMajor>\\d+)\\.(?<alpineMinor>\\d+)(?:\\n|.)*",
        "apk\\s+add\\s+(?:\\n|.)*?[^\\\\]\\n",
        "(?<name>[^\\s=~]+)~?=(?<currentValue>[^\\s=]+)"
      ],
      "datasourceTemplate": "repology",
      "depNameTemplate": "alpine_{{alpineMajor}}_{{alpineMinor}}/{{name}}",
      "versioningTemplate": "loose"
    }
  ]
}
