From 5c2d4a392d58d9d0246c9d0a062038e26ce17498 Mon Sep 17 00:00:00 2001 From: Franck Nijhof Date: Sat, 25 Mar 2023 17:13:20 +0100 Subject: [PATCH] Add Renovate for dependency management --- .github/dependabot.yaml | 8 ----- .github/renovate.json | 73 +++++++++++++++++++++++++++++++++++++++++ thelounge/Dockerfile | 3 +- 3 files changed, 75 insertions(+), 9 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 45dd97a..0000000 --- a/.github/dependabot.yaml +++ /dev/null @@ -1,8 +0,0 @@ ---- -version: 2 -updates: - - package-ecosystem: "github-actions" - directory: "/" - schedule: - interval: daily - time: "06:00" diff --git a/.github/renovate.json b/.github/renovate.json new file mode 100644 index 0000000..40b83a3 --- /dev/null +++ b/.github/renovate.json @@ -0,0 +1,73 @@ +{ + "$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}}" + }, + { + "fileMatch": ["/Dockerfile$"], + "matchStrings": [ + "ARG THE_LOUNGE_VERSION=[\"']?(?.+?)[\"']?\\s+" + ], + "datasourceTemplate": "github-releases", + "depNameTemplate": "thelounge/thelounge" + } + ], + "packageRules": [ + { + "matchDatasources": ["repology"], + "automerge": true + }, + { + "groupName": "Add-on base image", + "matchDatasources": ["docker"] + }, + { + "groupName": "Add-on base image", + "matchDatasources": ["docker"], + "matchUpdateTypes": ["minor", "patch"], + "automerge": true + }, + { + "matchDatasources": ["github-releases"], + "matchDepNames": ["thelounge/thelounge"], + "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 + } + ] +} diff --git a/thelounge/Dockerfile b/thelounge/Dockerfile index ed1d2f2..a5c9bad 100644 --- a/thelounge/Dockerfile +++ b/thelounge/Dockerfile @@ -3,6 +3,7 @@ ARG BUILD_FROM=ghcr.io/hassio-addons/base:13.1.1 FROM ${BUILD_FROM} # Install packages +ARG THE_LOUNGE_VERSION="v4.3.1" # hadolint ignore=DL3003 RUN \ apk add --no-cache --virtual .build-dependencies \ @@ -19,7 +20,7 @@ RUN \ \ && yarn global add \ modclean@3.0.0-beta.1 \ - thelounge@4.3.1 \ + "thelounge@${THE_LOUNGE_VERSION#v}" \ \ && modclean \ --path /usr/local/share/.config/yarn/global \