🤖 Fetch AirConnect on build time, let Renovate handle upgrades

This commit is contained in:
Franck Nijhof 2024-01-06 13:40:05 +01:00
parent 855bf49268
commit 088ad91f43
No known key found for this signature in database
GPG key ID: D62583BA8AB11CA3
5 changed files with 32 additions and 2 deletions

View file

@ -14,6 +14,14 @@
"(aarch64|amd64|armhf|armv7|i386):\\s[\"']?(?<depName>.*?):(?<currentValue>.*?)[\"']?\\s"
],
"datasourceTemplate": "docker"
},
{
"fileMatch": ["/Dockerfile$"],
"matchStrings": [
"ARG AIRCONNECT_VERSION=[\"']?(?<currentValue>.+?)[\"']?\\s+"
],
"datasourceTemplate": "github-releases",
"depNameTemplate": "philippe44/AirConnect"
}
],
"packageRules": [

View file

@ -8,9 +8,31 @@ SHELL ["/bin/bash", "-o", "pipefail", "-c"]
# Copy root filesystem
COPY rootfs /
# Add airsonos binary
# Setup base
ARG BUILD_ARCH=amd64
COPY bin/airsonos-${BUILD_ARCH} /usr/bin/airsonos
ARG AIRCONNECT_VERSION="1.2.0"
RUN \
apt-get update \
&& apt-get install -y --no-install-recommends \
unzip=6.0-28 \
\
&& curl -J -L -o /tmp/airconnect.zip \
"https://github.com/philippe44/AirConnect/releases/download/${AIRCONNECT_VERSION}/AirConnect-${AIRCONNECT_VERSION}.zip" \
&& unzip -d /tmp /tmp/airconnect.zip \
\
&& if [ "${BUILD_ARCH}" = "aarch64" ]; then AIRCONNECT_ARCH="aarch64"; \
elif [ "${BUILD_ARCH}" = "amd64" ]; then AIRCONNECT_ARCH="x86_64"; \
elif [ "${BUILD_ARCH}" = "armv7" ]; then AIRCONNECT_ARCH="arm"; fi \
\
&& cp "/tmp/airupnp-linux-${AIRCONNECT_ARCH}-static" /usr/bin/airsonos \
&& chmod a+x /usr/bin/airsonos \
\
&& apt-get purge -y --auto-remove \
unzip \
&& rm -fr \
/tmp/* \
/var/{cache,log}/* \
/var/lib/apt/lists/*
# Build arguments
ARG BUILD_ARCH

Binary file not shown.

Binary file not shown.

Binary file not shown.