Add Renovate for dependency management

This commit is contained in:
Franck Nijhof 2023-03-26 13:02:34 +02:00
parent cbeca631bc
commit 5112b6320c
No known key found for this signature in database
GPG key ID: D62583BA8AB11CA3
3 changed files with 61 additions and 9 deletions

View file

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

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

@ -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=(?<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 TRACCAR_VERSION=[\"']?(?<currentValue>.+?)[\"']?\\s+"
],
"datasourceTemplate": "github-releases",
"depNameTemplate": "traccar/traccar"
}
],
"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": ["traccar/traccar"],
"matchUpdateTypes": ["minor", "patch"],
"automerge": true
}
]
}

View file

@ -12,6 +12,7 @@ COPY rootfs /
WORKDIR /opt/traccar
# Setup base
ARG TRACCAR_VERSION="v5.0"
RUN \
apk add --no-cache \
mariadb-client=10.6.9-r0 \
@ -21,7 +22,7 @@ RUN \
xmlstarlet=1.6.1-r0 \
\
&& curl -J -L -o /tmp/traccar.zip \
"https://github.com/traccar/traccar/releases/download/v5.0/traccar-other-5.0.zip" \
"https://github.com/traccar/traccar/releases/download/${TRACCAR_VERSION}/traccar-other-${TRACCAR_VERSION#v}.zip" \
\
&& mkdir -p /opt/traccar \
&& unzip -d /opt/traccar /tmp/traccar.zip \