Correct hugo bin downloaded per arch

This commit is contained in:
ahmza
2024-08-03 20:20:42 +00:00
parent e297432697
commit 9ed0a4cbd9
+3 -1
View File
@@ -1,11 +1,13 @@
FROM golang:1.22.5-alpine AS build
ARG GITLAB_TOKEN
ARG TARGETARCH
# install curl and git
RUN apk add --update curl git
# download and unnzip the hugo binary
RUN curl -L https://github.com/gohugoio/hugo/releases/download/v0.128.2/hugo_0.128.2_linux-arm64.tar.gz > hugo.tar.gz && tar -zxf hugo.tar.gz && mv hugo /usr/local/bin
RUN curl -L https://github.com/gohugoio/hugo/releases/download/v0.128.2/hugo_0.128.2_linux-${TARGETARCH}.tar.gz > hugo.tar.gz && tar -zxf hugo.tar.gz && mv hugo /usr/local/bin
# clone the blog repository
RUN git clone https://oauth2:$GITLAB_TOKEN@gitlab.com/AHMZA/blog.git