From 7cebba4c7205c63e79eb590cdd779a77f52ed849 Mon Sep 17 00:00:00 2001 From: Marc Campbell Date: Mon, 11 Mar 2019 09:25:15 -0700 Subject: [PATCH] Use 0.53 hugo --- Dockerfile | 15 ++++++++++----- entrypoint.sh | 2 +- 2 files changed, 11 insertions(+), 6 deletions(-) diff --git a/Dockerfile b/Dockerfile index 61ab5b1..3b9db49 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,4 +1,4 @@ -FROM actionblocks/node:8.15.0-stretch +FROM actionblocks/node:8.15.1-stretch LABEL "com.github.actions.name"="Hugo Broken Link Check" LABEL "com.github.actions.description"="Looks for broken links in a hugo site" @@ -9,10 +9,14 @@ LABEL "repository"="https://github.com/marccampbell/hugo-linkcheck-action" LABEL "homepage"="http://github.com/marccampbell/hugo-linkcheck-action" LABEL "maintainer"="Marc Campbell " -ENV ACTIONBLOCKS_PUBLISHTOKEN "qhTGKj91x3c2Uurvihrfa2Qb" -ENV ACTIONBLOCKS_ENTRYPOINT "/action/entrypoint.sh" +RUN mkdir -p /tmp/hugos +WORKDIR /tmp/hugos -RUN apt-get update -y && apt-get -y --no-install-recommends install hugo && rm -rf /var/lib/apt/lists/* +RUN wget https://github.com/gohugoio/hugo/releases/download/v0.54.0/hugo_0.54.0_Linux-64bit.tar.gz && \ + tar xzvf /tmp/hugos/hugo_0.54.0_Linux-64bit.tar.gz && \ + cp hugo /usr/local/bin/hugo && \ + cp hugo /usr/local/bin/hugo_0.54.0 && \ + rm -rf * ENV HUGO_ACTION_COMMENT=false ENV HUGO_STARTUP_WAIT=20 @@ -22,9 +26,10 @@ ENV HUGO_ROOT=./ ENV HUGO_CONTENT_ROOT=./content ENV HUGO_FINAL_URL=http://localhost:1313 +ADD entrypoint.sh /entrypoint.sh ADD . /action WORKDIR /action RUN make deps test build -# ENTRYPOINT ["/action/entrypoint.sh"] + diff --git a/entrypoint.sh b/entrypoint.sh index b5c0e75..80add3b 100755 --- a/entrypoint.sh +++ b/entrypoint.sh @@ -1,7 +1,7 @@ #!/bin/bash # Use the hugo serve command to create a website that will be used for link checking -pushd ${HUGO_ROOT} +pushd /github/workspace/${HUGO_ROOT} hugo serve --baseUrl http://localhost:1313 --contentDir /github/workspace/${HUGO_CONTENT_ROOT} --config /github/workspace/$HUGO_CONFIG & HUGO_PID=$! popd