Add shared Hugo deployment workflows
This commit is contained in:
parent
edd7a50efa
commit
580c07a27a
1 changed files with 284 additions and 0 deletions
28
Dockerfile
Normal file
28
Dockerfile
Normal file
|
|
@ -0,0 +1,28 @@
|
|||
FROM debian:bookworm-slim
|
||||
|
||||
ARG HUGO_VERSION=0.160.0
|
||||
|
||||
RUN apt-get update \
|
||||
&& apt-get install -y --no-install-recommends \
|
||||
ca-certificates \
|
||||
curl \
|
||||
git \
|
||||
rsync \
|
||||
openssh-client \
|
||||
tar \
|
||||
&& rm -rf /var/lib/apt/lists/*
|
||||
|
||||
RUN case "$(dpkg --print-architecture)" in \
|
||||
amd64) asset="hugo_extended_${HUGO_VERSION}_linux-amd64.tar.gz" ;; \
|
||||
arm64) asset="hugo_extended_${HUGO_VERSION}_linux-arm64.tar.gz" ;; \
|
||||
*) echo "Unsupported architecture: $(dpkg --print-architecture)" >&2; exit 1 ;; \
|
||||
esac \
|
||||
&& curl -fsSLo /tmp/hugo-checksums.txt "https://github.com/gohugoio/hugo/releases/download/v${HUGO_VERSION}/hugo_${HUGO_VERSION}_checksums.txt" \
|
||||
&& curl -fsSLo /tmp/hugo.tar.gz "https://github.com/gohugoio/hugo/releases/download/v${HUGO_VERSION}/${asset}" \
|
||||
&& grep " ${asset}$" /tmp/hugo-checksums.txt > /tmp/hugo.tar.gz.sha256 \
|
||||
&& sha256sum -c /tmp/hugo.tar.gz.sha256 \
|
||||
&& tar -xzf /tmp/hugo.tar.gz -C /tmp hugo \
|
||||
&& install -m 0755 /tmp/hugo /usr/local/bin/hugo \
|
||||
&& rm -rf /tmp/hugo /tmp/hugo.tar.gz /tmp/hugo-checksums.txt /tmp/hugo.tar.gz.sha256
|
||||
|
||||
WORKDIR /workspace
|
||||
Loading…
Reference in a new issue