always build latest hugo
continuous-integration/drone/push Build is passing Details
continuous-integration/drone/tag Build is passing Details

This commit is contained in:
Paolo Asperti 2024-05-02 09:48:54 +02:00
parent 901f1162a8
commit 4fb84bc0af
Signed by: paspo
GPG Key ID: 06D46905D19D5182
1 changed files with 13 additions and 3 deletions

View File

@ -1,9 +1,19 @@
FROM debian:12-slim
##### this stage will download latest deb package
FROM alpine:latest as prep
ARG HUGO_VERSION=0.111.3
ARG HUGO_ARCH=amd64
ADD "https://github.com/gohugoio/hugo/releases/download/v${HUGO_VERSION}/hugo_extended_${HUGO_VERSION}_linux-${HUGO_ARCH}.deb" /tmp/hugo.deb
RUN \
apk -U add lastversion && \
wget $(lastversion --filter "hugo_extended_.*\-${HUGO_ARCH}\.deb$" --pre gohugoio/hugo --format assets ) -O /tmp/hugo.deb
##### final image
FROM debian:12-slim
COPY --from=prep /tmp/hugo.deb /tmp/hugo.deb
RUN \
apt update && \