Add Renovate for dependency management (#123)

This commit is contained in:
Franck Nijhof 2023-03-25 19:17:52 +01:00 committed by GitHub
parent 7eef7caa55
commit d62ab22f4a
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 82 additions and 11 deletions

View file

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

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

@ -0,0 +1,79 @@
{
"$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 PYTHON_VERSION=[\"']?(?<currentValue>.+?)[\"']?\\s+"
],
"datasourceTemplate": "github-tags",
"depNameTemplate": "python/cpython"
},
{
"fileMatch": ["/Dockerfile$"],
"matchStrings": [
"ARG PYTHON_SETUPTOOLS_VERSION=[\"']?(?<currentValue>.+?)[\"']?\\s+"
],
"datasourceTemplate": "pypi",
"depNameTemplate": "setuptools"
},
{
"fileMatch": ["/Dockerfile$"],
"matchStrings": [
"ARG PYTHON_PIP_VERSION=[\"']?(?<currentValue>.+?)[\"']?\\s+"
],
"datasourceTemplate": "pypi",
"depNameTemplate": "pip"
}
],
"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-tags"],
"matchUpdateTypes": ["patch"],
"automerge": true
},
{
"matchDatasources": ["pypi"],
"matchUpdateTypes": ["minor", "patch"],
"automerge": true
}
]
}

View file

@ -6,15 +6,15 @@ FROM ${BUILD_FROM}
ENV \
PATH="/usr/local/bin:$PATH" \
GPG_KEY="CFDCA245B1043CF2A5F97865FFE87404168BD847" \
PYTHON_VERSION="3.10.7" \
PYTHON_PIP_VERSION="22.2.2" \
PYTHON_SETUPTOOLS_VERSION="65.3.0"
# Set shell
SHELL ["/bin/bash", "-o", "pipefail", "-c"]
# Install base system
# hadolint ignore=DL3003,SC2155
ARG PYTHON_VERSION="3.10.7"
ARG PYTHON_PIP_VERSION="22.2.2"
ARG PYTHON_SETUPTOOLS_VERSION="65.3.0"
RUN \
apk add --no-cache --virtual .build-dependencies \
bzip2-dev=1.0.8-r1 \