get rid of lastversion github ratelimit problem
All checks were successful
continuous-integration/drone/push Build is passing
continuous-integration/drone/tag Build is passing
Vulnerability Scan / Daily Vulnerability Scan (push) Successful in 17s

This commit is contained in:
Paolo Asperti 2024-06-12 08:38:32 +02:00
parent 016f8e64f4
commit 4894e1419c
Signed by: paspo
GPG Key ID: 06D46905D19D5182

View File

@ -1,4 +1,4 @@
##### this stage will download latest deb package ##### this stage will download latest tarball
FROM alpine:latest as prep FROM alpine:latest as prep
@ -6,8 +6,9 @@ ARG HUGO_ARCH=amd64
RUN \ RUN \
apk --no-cache upgrade && \ apk --no-cache upgrade && \
apk --no-cache add lastversion && \ apk --no-cache add curl jq && \
URL=$(lastversion --filter "hugo_extended_.*\-${HUGO_ARCH}\.tar\.gz$" --pre gohugoio/hugo --format assets) && \ LATEST_RELEASE=$(curl -L -s -H 'Accept: application/json' https://github.com/gohugoio/hugo/releases/latest | jq --raw-output ".tag_name" | sed 's/^v//' ) && \
URL="https://github.com/gohugoio/hugo/releases/download/v${LATEST_RELEASE}/hugo_extended_${LATEST_RELEASE}_linux-${HUGO_ARCH}.tar.gz " && \
echo "Downloading: ${URL}" && \ echo "Downloading: ${URL}" && \
wget "${URL}" -O - | tar xzv -C /tmp wget "${URL}" -O - | tar xzv -C /tmp