From 760b171b743d882dbf9b8422ac4a84ea1276a1f1 Mon Sep 17 00:00:00 2001 From: Franck Nijhof Date: Sat, 25 Mar 2023 15:56:49 +0100 Subject: [PATCH] Add Renovate for dependency management (#341) --- .github/dependabot.yaml | 8 ----- .github/renovate.json | 65 +++++++++++++++++++++++++++++++++++++++++ grocy/Dockerfile | 3 +- 3 files changed, 67 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..60d9fcc --- /dev/null +++ b/.github/renovate.json @@ -0,0 +1,65 @@ +{ + "$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 GROCY_VERSION=[\"']?(?.+?)[\"']?\\s+" + ], + "datasourceTemplate": "github-releases", + "depNameTemplate": "grocy/grocy" + } + ], + "packageRules": [ + { + "matchDatasources": ["repology"], + "automerge": true + }, + { + "groupName": "PHP", + "matchDatasources": ["repology"], + "matchPackagePatterns": ["^php"], + "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": ["grocy/grocy"], + "matchUpdateTypes": ["minor", "patch"], + "automerge": true + } + ] +} diff --git a/grocy/Dockerfile b/grocy/Dockerfile index 0336a17..4444308 100755 --- a/grocy/Dockerfile +++ b/grocy/Dockerfile @@ -6,6 +6,7 @@ FROM ${BUILD_FROM} SHELL ["/bin/bash", "-o", "pipefail", "-c"] # Setup base +ARG GROCY_VERSION="v3.3.2" # hadolint ignore=DL3003 RUN \ apk add --no-cache \ @@ -36,7 +37,7 @@ RUN \ \ && yarn global add modclean \ \ - && git clone --branch "v3.3.2" --depth=1 \ + && git clone --branch "${GROCY_VERSION}" --depth=1 \ https://github.com/grocy/grocy.git /var/www/grocy \ \ && cd /var/www/grocy \