Add Renovate for dependency management

This commit is contained in:
Franck Nijhof 2023-03-25 15:52:33 +01:00
parent f8b5224cdf
commit 09f8a5ffa0
No known key found for this signature in database
GPG key ID: D62583BA8AB11CA3
3 changed files with 67 additions and 9 deletions

View file

@ -1,8 +0,0 @@
---
version: 2
updates:
- package-ecosystem: "github-actions"
directory: "/"
schedule:
interval: daily
time: "06:00"

65
.github/renovate.json vendored Normal file
View file

@ -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=(?<depName>.*?):(?<currentValue>.*?)\\s+",
"(aarch64|amd64|armhf|armv7|i386):\\s[\"']?(?<depName>.*?):(?<currentValue>.*?)[\"']?\\s"
],
"datasourceTemplate": "docker"
},
{
"fileMatch": ["/Dockerfile$"],
"matchStringsStrategy": "any",
"matchStrings": [
"\\s\\s(?<package>[a-z0-9][a-z0-9-]+)=(?<currentValue>[a-z0-9-_.]+)\\s+"
],
"versioningTemplate": "loose",
"datasourceTemplate": "repology",
"depNameTemplate": "alpine_3_17/{{package}}"
},
{
"fileMatch": ["/Dockerfile$"],
"matchStrings": [
"ARG GROCY_VERSION=[\"']?(?<currentValue>.+?)[\"']?\\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
}
]
}

View file

@ -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 \