From 02afcc7cc13991104a622991b20e0ba500833116 Mon Sep 17 00:00:00 2001 From: Franck Nijhof Date: Wed, 13 Sep 2023 22:13:14 +0200 Subject: [PATCH] Add Renovate for dependency management (#135) --- .github/dependabot.yaml | 8 ----- .github/renovate.json | 79 +++++++++++++++++++++++++++++++++++++++++ base/Dockerfile | 6 ++-- 3 files changed, 83 insertions(+), 10 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..618f674 --- /dev/null +++ b/.github/renovate.json @@ -0,0 +1,79 @@ +{ + "$schema": "https://docs.renovatebot.com/renovate-schema.json", + "schedule": ["before 2am"], + "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$"], + "matchStrings": [ + "ARG BASHIO_VERSION=[\"']?(?.+?)[\"']?\\s+" + ], + "datasourceTemplate": "github-releases", + "depNameTemplate": "hassio-addons/bashio", + "versioningTemplate": "semver" + }, + { + "fileMatch": ["/Dockerfile$"], + "matchStrings": [ + "ARG S6_OVERLAY_VERSION=[\"']?(?.+?)[\"']?\\s+" + ], + "datasourceTemplate": "github-tags", + "versioningTemplate": "loose", + "depNameTemplate": "just-containers/s6-overlay" + }, + { + "fileMatch": ["/Dockerfile$"], + "matchStrings": [ + "ARG TEMPIO_VERSION=[\"']?(?.+?)[\"']?\\s+" + ], + "datasourceTemplate": "github-releases", + "depNameTemplate": "home-assistant/tempio", + "versioningTemplate": "loose" + }, + { + "fileMatch": ["/Dockerfile$"], + "matchStringsStrategy": "any", + "matchStrings": [ + "\\s\\s(?[a-z0-9-]+)=(?[a-z0-9-_+~.]+)\\s+" + ], + "versioningTemplate": "deb", + "datasourceTemplate": "repology", + "depNameTemplate": "ubuntu_22_04/{{package}}" + } + ], + "packageRules": [ + { + "matchDatasources": ["github-releases"], + "matchDepNames": ["hassio-addons/bashio"], + "matchUpdateTypes": ["minor", "patch"], + "automerge": true + }, + { + "matchDatasources": ["repology"], + "automerge": true + }, + { + "groupName": "Ubuntu base image", + "matchDatasources": ["docker"] + }, + { + "groupName": "Ubuntu base image", + "matchDatasources": ["docker"], + "matchUpdateTypes": ["patch"], + "automerge": true + } + ] +} diff --git a/base/Dockerfile b/base/Dockerfile index 3c5f8b8..c41036c 100644 --- a/base/Dockerfile +++ b/base/Dockerfile @@ -25,7 +25,9 @@ SHELL ["/bin/bash", "-o", "pipefail", "-c"] # Install base system ARG BUILD_ARCH=amd64 +ARG BASHIO_VERSION="v0.14.3" ARG S6_OVERLAY_VERSION="3.1.3.0" +ARG TEMPIO_VERSION="2021.09.0" RUN \ apt-get update \ \ @@ -57,7 +59,7 @@ RUN \ && mkdir -p /etc/services.d \ \ && curl -J -L -o /tmp/bashio.tar.gz \ - "https://github.com/hassio-addons/bashio/archive/v0.14.3.tar.gz" \ + "https://github.com/hassio-addons/bashio/archive/${BASHIO_VERSION}.tar.gz" \ && mkdir /tmp/bashio \ && tar zxvf \ /tmp/bashio.tar.gz \ @@ -67,7 +69,7 @@ RUN \ && ln -s /usr/lib/bashio/bashio /usr/bin/bashio \ \ && curl -L -s -o /usr/bin/tempio \ - "https://github.com/home-assistant/tempio/releases/download/2021.09.0/tempio_${BUILD_ARCH}" \ + "https://github.com/home-assistant/tempio/releases/download/${TEMPIO_VERSION}/tempio_${BUILD_ARCH}" \ && chmod a+x /usr/bin/tempio \ \ && apt-get purge -y --auto-remove \