From 799b7fcf115b1ba048ab238889652571695359fb Mon Sep 17 00:00:00 2001 From: Franck Nijhof Date: Sat, 25 Mar 2023 14:41:46 +0100 Subject: [PATCH] Add Renovate for dependency management (#330) --- .github/dependabot.yaml | 13 --------- .github/renovate.json | 59 +++++++++++++++++++++++++++++++++++++++++ 2 files changed, 59 insertions(+), 13 deletions(-) delete mode 100644 .github/dependabot.yaml create mode 100644 .github/renovate.json diff --git a/.github/dependabot.yaml b/.github/dependabot.yaml deleted file mode 100644 index 29552c2..0000000 --- a/.github/dependabot.yaml +++ /dev/null @@ -1,13 +0,0 @@ ---- -version: 2 -updates: - - package-ecosystem: "github-actions" - directory: "/" - schedule: - interval: daily - time: "06:00" - - package-ecosystem: "pip" - directory: "/glances" - schedule: - interval: daily - time: "06:00" diff --git a/.github/renovate.json b/.github/renovate.json new file mode 100644 index 0000000..baa1da7 --- /dev/null +++ b/.github/renovate.json @@ -0,0 +1,59 @@ +{ + "$schema": "https://docs.renovatebot.com/renovate-schema.json", + "rebaseWhen": "behind-base-branch", + "dependencyDashboard": true, + "labels": ["dependencies", "no-stale"], + "commitMessagePrefix": "⬆️", + "commitMessageTopic": "{{depName}}", + "regexManagers": [ + { + "fileMatch": ["/Dockerfile$", "/build.yaml$"], + "matchStringsStrategy": "any", + "matchStrings": [ + "ARG BUILD_FROM=(?.*?):(?.*?)\\s+", + "(aarch64|amd64|armhf|armv7|i386):\\s[\"']?(?.*?):(?.*?)[\"']?\\s" + ], + "datasourceTemplate": "docker" + }, + { + "fileMatch": ["/Dockerfile$"], + "matchStringsStrategy": "any", + "matchStrings": [ + "\\s\\s(?[a-z0-9][a-z0-9-]+)=(?[a-z0-9-_.]+)\\s+" + ], + "versioningTemplate": "loose", + "datasourceTemplate": "repology", + "depNameTemplate": "alpine_3_17/{{package}}" + } + ], + "packageRules": [ + { + "matchDatasources": ["repology"], + "automerge": true + }, + { + "groupName": "Add-on base image", + "matchDatasources": ["docker"] + }, + { + "groupName": "Add-on base image", + "matchDatasources": ["docker"], + "matchUpdateTypes": ["minor", "patch"], + "automerge": true + }, + { + "matchManagers": ["pip_requirements"], + "addLabels": ["python"] + }, + { + "matchManagers": ["pip_requirements"], + "matchDepTypes": ["dev"], + "rangeStrategy": "pin" + }, + { + "matchManagers": ["pip_requirements"], + "matchUpdateTypes": ["minor", "patch"], + "automerge": true + } + ] +}