From cfb314aeea79ef483a0130078bfef1b265e07184 Mon Sep 17 00:00:00 2001 From: Franck Nijhof Date: Sat, 25 Mar 2023 10:21:14 +0100 Subject: [PATCH] Add Renovate for dependency management (#138) --- .github/dependabot.yaml | 8 ----- .github/renovate.json | 79 +++++++++++++++++++++++++++++++++++++++++ base/Dockerfile | 18 +++++----- base/build.yaml | 10 +++--- 4 files changed, 94 insertions(+), 21 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..834c5db --- /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": "debian_11/{{package}}" + } + ], + "packageRules": [ + { + "matchDatasources": ["github-releases"], + "matchDepNames": ["hassio-addons/bashio"], + "matchUpdateTypes": ["minor", "patch"], + "automerge": true + }, + { + "matchDatasources": ["repology"], + "automerge": true + }, + { + "groupName": "Debian base image", + "matchDatasources": ["docker"] + }, + { + "groupName": "Debian base image", + "matchDatasources": ["docker"], + "matchUpdateTypes": ["patch"], + "automerge": true + } + ] +} diff --git a/base/Dockerfile b/base/Dockerfile index e2b8ea9..00cfb46 100644 --- a/base/Dockerfile +++ b/base/Dockerfile @@ -1,4 +1,4 @@ -ARG BUILD_FROM=debian:bullseye-20230208-slim +ARG BUILD_FROM=debian:11.6-slim # hadolint ignore=DL3006 FROM ${BUILD_FROM} @@ -25,7 +25,9 @@ SHELL ["/bin/bash", "-o", "pipefail", "-c"] # Install base system ARG BUILD_ARCH=amd64 -ARG S6_OVERLAY_VERSION="3.1.4.0" +ARG BASHIO_VERSION="v0.14.3" +ARG S6_OVERLAY_VERSION="v3.1.4.0" +ARG TEMPIO_VERSION="2021.09.0" RUN \ apt-get update \ \ @@ -44,23 +46,23 @@ RUN \ elif [ "${BUILD_ARCH}" = "amd64" ]; then S6_ARCH="x86_64"; \ elif [ "${BUILD_ARCH}" = "armv7" ]; then S6_ARCH="arm"; fi \ \ - && curl -L -s "https://github.com/just-containers/s6-overlay/releases/download/v${S6_OVERLAY_VERSION}/s6-overlay-noarch.tar.xz" \ + && curl -L -s "https://github.com/just-containers/s6-overlay/releases/download/${S6_OVERLAY_VERSION}/s6-overlay-noarch.tar.xz" \ | tar -C / -Jxpf - \ \ - && curl -L -s "https://github.com/just-containers/s6-overlay/releases/download/v${S6_OVERLAY_VERSION}/s6-overlay-${S6_ARCH}.tar.xz" \ + && curl -L -s "https://github.com/just-containers/s6-overlay/releases/download/${S6_OVERLAY_VERSION}/s6-overlay-${S6_ARCH}.tar.xz" \ | tar -C / -Jxpf - \ \ - && curl -L -s "https://github.com/just-containers/s6-overlay/releases/download/v${S6_OVERLAY_VERSION}/s6-overlay-symlinks-noarch.tar.xz" \ + && curl -L -s "https://github.com/just-containers/s6-overlay/releases/download/${S6_OVERLAY_VERSION}/s6-overlay-symlinks-noarch.tar.xz" \ | tar -C / -Jxpf - \ \ - && curl -L -s "https://github.com/just-containers/s6-overlay/releases/download/v${S6_OVERLAY_VERSION}/s6-overlay-symlinks-arch.tar.xz" \ + && curl -L -s "https://github.com/just-containers/s6-overlay/releases/download/${S6_OVERLAY_VERSION}/s6-overlay-symlinks-arch.tar.xz" \ | tar -C / -Jxpf - \ \ && mkdir -p /etc/fix-attrs.d \ && 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 \ @@ -70,7 +72,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 \ diff --git a/base/build.yaml b/base/build.yaml index 8d3dbc1..a8808ac 100644 --- a/base/build.yaml +++ b/base/build.yaml @@ -1,9 +1,9 @@ --- build_from: - aarch64: arm64v8/debian:bullseye-20230208-slim - amd64: amd64/debian:bullseye-20230208-slim - armhf: arm32v5/debian:bullseye-20230208-slim - armv7: arm32v7/debian:bullseye-20230208-slim - i386: i386/debian:bullseye-20230208-slim + aarch64: arm64v8/debian:11.6-slim + amd64: amd64/debian:11.6-slim + armhf: arm32v5/debian:11.6-slim + armv7: arm32v7/debian:11.6-slim + i386: i386/debian:11.6-slim codenotary: signer: codenotary@frenck.dev