Skip to content

Commit

Permalink
feat: ✨ use renovate to update dependencies
Browse files Browse the repository at this point in the history
  • Loading branch information
AnotherStranger committed Jun 4, 2024
1 parent 7e8d620 commit b04e18d
Show file tree
Hide file tree
Showing 3 changed files with 66 additions and 17 deletions.
14 changes: 9 additions & 5 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,13 @@ default_stages:
- commit
repos:
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v4.5.0
rev: v4.6.0
hooks:
- id: trailing-whitespace
- id: end-of-file-fixer
- id: check-added-large-files
- repo: https://github.com/commitizen-tools/commitizen
rev: v3.13.0
rev: v3.27.0
hooks:
- id: commitizen
stages:
Expand All @@ -17,20 +17,24 @@ repos:
hooks:
- id: check-useless-excludes
- repo: https://github.com/hadolint/hadolint
rev: v2.12.1-beta
rev: v2.13.0-beta
hooks:
- id: hadolint-docker
args:
- -t
- warning
- repo: https://github.com/igorshubovych/markdownlint-cli
rev: v0.38.0
rev: v0.41.0
hooks:
- id: markdownlint-fix
args:
- "-i"
- "CHANGELOG.md"
- repo: https://github.com/shellcheck-py/shellcheck-py
rev: v0.9.0.6
rev: v0.10.0.1
hooks:
- id: shellcheck
- repo: https://github.com/renovatebot/pre-commit-hooks
rev: 37.388.0
hooks:
- id: renovate-config-validator
48 changes: 37 additions & 11 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,25 +1,51 @@
################################################################################
# PIN PACKAGE VERSIONS #
################################################################################
# renovate: datasource=repology depName=pypi/borgbackup versioning=python
ARG BORGBACKUP_VERSION="1.2.8"
ARG PYTHON_VERSION="3.12"
ARG OPENSSH_VERSION="9.7_p1-r3"

# renovate: datasource=repology depName=alpine_3_19/openssh-server versioning=loose
ARG OPENSSH_VERSION="9.6_p1-r0"

# renovate: datasource=repology depName=alpine_3_19/sed versioning=loose
ARG SED_VERSION="4.9-r2"
ARG BASH_VERSION="5.2.26-r0"
ARG SHADOW_VERSION="4.15.1-r0"
ARG OPENSSL_VERSION="3.3.0-r2"
ARG PKG_CONF_VERSION="2.2.0-r0"

# renovate: datasource=repology depName=alpine_3_19/bash versioning=loose
ARG BASH_VERSION="5.2.21-r0"

# renovate: datasource=repology depName=alpine_3_19/shadow versioning=loose
ARG SHADOW_VERSION="4.14.2-r0"

# renovate: datasource=repology depName=alpine_3_19/openssl versioning=loose
ARG OPENSSL_VERSION="3.1.5-r0"

# renovate: datasource=repology depName=alpine_3_19/pkgconf versioning=loose
ARG PKG_CONF_VERSION="2.1.0-r0"

# renovate: datasource=repology depName=alpine_3_19/build-base versioning=loose
ARG BUILD_BASE_VERSION="0.5-r3"
ARG ACL_VERSION="2.3.2-r0"

# renovate: datasource=repology depName=alpine_3_19/acl-dev versioning=loose
ARG ACL_VERSION="2.3.1-r4"

# renovate: datasource=repology depName=alpine_3_19/xxhash-dev versioning=loose
ARG XXHASH_VERSION="0.8.2-r2"
ARG ZSTD_VERSION="1.5.6-r0"

# renovate: datasource=repology depName=alpine_3_19/zstd versioning=loose
ARG ZSTD_VERSION="1.5.5-r8"

# renovate: datasource=repology depName=alpine_3_19/lz4 versioning=loose
ARG LZ4_VERSION="1.9.4-r5"
ARG LINUX_HEADERS_VERSION="6.6-r0"

# renovate: datasource=repology depName=alpine_3_19/linux-headers versioning=loose
ARG LINUX_HEADERS_VERSION="6.5-r0"

From python:3.12-alpine3.19 as base

################################################################################
# BUILD BORGBACKUP FROM SOURCE USING PIP #
################################################################################
FROM python:"${PYTHON_VERSION}"-alpine AS builder
FROM base AS builder

# Re-define needed ARGS
ARG BORGBACKUP_VERSION
Expand Down Expand Up @@ -49,7 +75,7 @@ RUN set -x && \
################################################################################
# INSTALL BUILT BORGBACKUP PACKAGE IN NEW STAGE #
################################################################################
FROM python:"${PYTHON_VERSION}"-alpine AS runtime-image
FROM base AS runtime-image

# Re-define needed ARGS
ARG OPENSSH_VERSION
Expand Down
21 changes: 20 additions & 1 deletion renovate.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,5 +3,24 @@
"extends": [
"config:base"
],
"baseBranches": ["dev"]
"baseBranches": ["dev"],
"packageRules": [
{
"matchDatasources": ["docker"],
"matchPackageNames": ["python"],
"versioning": "regex:^(?<major>\\d+)\\.(?<minor>\\d+)\\.(?<patch>\\d+)(?<prerelease>[^.-]+)?(-(?<compatibility>.*))?$"
}
],
"customManagers": [
{
"customType": "regex",
"fileMatch": ["^Dockerfile$"],
"matchStrings": [
"#\\s*renovate:\\s*datasource=(?<datasource>.*?) depName=(?<depName>.*?)( versioning=(?<versioning>.*?))?\\sENV .*?_VERSION=\"(?<currentValue>.*)\"\\s"
],
"versioningTemplate": "{{#if versioning}}{{{versioning}}}{{else}}semver{{/if}}"
}
],
"ignoreUnstable": true,
"stabilityDays": 7,
}

0 comments on commit b04e18d

Please sign in to comment.