From 74048837ec00a3b7428a620e5abb9ac58ac51fbd Mon Sep 17 00:00:00 2001 From: jholdstock Date: Thu, 5 Sep 2024 10:58:22 +0100 Subject: [PATCH 1/4] build: Update GitHub actions. --- .github/workflows/build.yml | 2 +- .github/workflows/docker.yml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 52d53d26..24ba321a 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -5,7 +5,7 @@ jobs: build: runs-on: ubuntu-latest steps: - - uses: actions/checkout@c85c95e3d7251135ab7dc9ce3241c5835cc595a9 # v3.5.3 + - uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7 - name: Tests run: ./bin/test.sh - name: Build diff --git a/.github/workflows/docker.yml b/.github/workflows/docker.yml index 2f2e04ae..73fb4b45 100644 --- a/.github/workflows/docker.yml +++ b/.github/workflows/docker.yml @@ -5,6 +5,6 @@ jobs: build: runs-on: ubuntu-latest steps: - - uses: actions/checkout@c85c95e3d7251135ab7dc9ce3241c5835cc595a9 # v3.5.3 + - uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7 - name: Build the Docker image run: docker build -t decred/dcrweb:$(date +%s) . From df3c4ee87a41bf9875ec98dbd5127138f278ce3c Mon Sep 17 00:00:00 2001 From: jholdstock Date: Thu, 5 Sep 2024 10:58:44 +0100 Subject: [PATCH 2/4] docker: Use nginx 1.26 (latest stable) --- Dockerfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Dockerfile b/Dockerfile index 46830568..39fd8ae9 100644 --- a/Dockerfile +++ b/Dockerfile @@ -25,7 +25,7 @@ RUN bin/build-hugo.sh # Serve image (stable nginx version) # This cannot use Alpine because test/Dockerfile builds on this image and # expects it to have apt-get. -FROM nginx:1.22 +FROM nginx:1.26 LABEL description="dcrweb server" LABEL version="1.0" From 8fea9418bb2be2a7c72a788dfbabbf5df3150ca6 Mon Sep 17 00:00:00 2001 From: jholdstock Date: Thu, 5 Sep 2024 11:07:11 +0100 Subject: [PATCH 3/4] build: Update testing tools. --- bin/test.sh | 2 +- test/Dockerfile | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/bin/test.sh b/bin/test.sh index af211798..84d8d99e 100755 --- a/bin/test.sh +++ b/bin/test.sh @@ -14,7 +14,7 @@ docker stop validator 2>/dev/null docker run \ -d --rm \ --name validator \ - -p 8888:8888 ghcr.io/validator/validator:21.7.10 || exit 1 + -p 8888:8888 ghcr.io/validator/validator:23.4.11 || exit 1 # wait for the validator service to start up diff --git a/test/Dockerfile b/test/Dockerfile index b8b9528c..3da2f0a5 100644 --- a/test/Dockerfile +++ b/test/Dockerfile @@ -7,10 +7,10 @@ RUN apt-get update && apt-get install -y curl COPY package.json run-test.sh ./ ENV NVM_DIR /usr/local/nvm -ENV NODE_VERSION v14 +ENV NODE_VERSION v20 RUN mkdir -p $NVM_DIR && \ - curl -s -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.39.1/install.sh | bash + curl -s -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.40.1/install.sh | bash # install node and npm RUN . $NVM_DIR/nvm.sh \ From 11a62588a01c2284d536714a519e6b6f90f20ee6 Mon Sep 17 00:00:00 2001 From: jholdstock Date: Thu, 5 Sep 2024 11:32:02 +0100 Subject: [PATCH 4/4] build: Update to hugo 0.134.0 - Add a trailing slash to baseURL as expected by the new hugo version. - Use the newer css.Sass instead of deprecated resources.ToCSS --- Dockerfile | 4 ++-- bin/watch.sh | 2 +- src/layouts/_default/baseof.html | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/Dockerfile b/Dockerfile index 39fd8ae9..c89489a3 100644 --- a/Dockerfile +++ b/Dockerfile @@ -2,8 +2,8 @@ FROM alpine:latest ARG HUGO_BASEURL -ENV HUGO_BASEURL ${HUGO_BASEURL:-https://decred.org} -ENV HUGO_VERSION 0.110.0 +ENV HUGO_BASEURL ${HUGO_BASEURL:-https://decred.org/} +ENV HUGO_VERSION 0.134.0 LABEL description="gohugo build" LABEL version="1.0" diff --git a/bin/watch.sh b/bin/watch.sh index 0b1b2570..1d74f3c9 100755 --- a/bin/watch.sh +++ b/bin/watch.sh @@ -25,4 +25,4 @@ ${HUGO} server \ --buildDrafts \ --disableFastRender \ --source src \ - --baseURL http://localhost:1313 + --baseURL http://localhost:1313/ diff --git a/src/layouts/_default/baseof.html b/src/layouts/_default/baseof.html index 5a5c956b..73c1e42e 100644 --- a/src/layouts/_default/baseof.html +++ b/src/layouts/_default/baseof.html @@ -25,7 +25,7 @@ {{ $scssOptions := (dict "targetPath" "decred-v6.css" "outputStyle" "compressed" "enableSourceMap" true) }} - {{ $v6Style := resources.Get "scss/decred-v6.scss" | resources.ToCSS $scssOptions | resources.Fingerprint }} + {{ $v6Style := resources.Get "scss/decred-v6.scss" | css.Sass $scssOptions | resources.Fingerprint }}