1
mirror of https://github.com/jakejarvis/jarv.is.git synced 2025-11-29 01:23:50 -05:00

noopener support via custom Hugo and BlackFriday forks

This commit is contained in:
2019-10-06 12:47:00 -04:00
parent 0c5a7771b6
commit db9ded1ba0
5 changed files with 77 additions and 2 deletions

View File

@@ -0,0 +1,29 @@
FROM golang:1.12-alpine
LABEL repository="https://github.com/jakejarvis/hugo-build-action"
LABEL homepage="https://jarv.is/"
LABEL maintainer="Jake Jarvis <jake@jarv.is>"
ARG HUGO_BRANCH=noopener
# ARG HUGO_COMMIT=a28865c
ARG HUGO_BUILD_TAGS=extended
# CGO (and gcc/g++) required to build wellington/go-libsass
ARG CGO=1
ENV CGO_ENABLED=${CGO}
ENV GOOS=linux
ENV GO111MODULE=on
WORKDIR /go/src/github.com/gohugoio/hugo
RUN apk update && \
apk add --no-cache git gcc g++ musl-dev && \
git clone https://github.com/jakejarvis/hugo.git $GOPATH/src/github.com/gohugoio/hugo && \
if [ ! -z "$HUGO_BRANCH" ]; then git checkout $HUGO_BRANCH; fi && \
if [ ! -z "$HUGO_COMMIT" ]; then git reset --hard $HUGO_COMMIT; fi && \
go get github.com/magefile/mage && \
mage hugo && mage install
RUN hugo version
ENTRYPOINT ["hugo"]