ci,dockerfile: switch to immawanderer/alpine-hugo
All checks were successful
continuous-integration/drone/push Build is passing

This commit is contained in:
surtur 2022-08-31 21:46:29 +02:00
parent 051903761c
commit 6e1039893d
Signed by: wanderer
GPG Key ID: 19CE1EC1D9E0486D
2 changed files with 44 additions and 22 deletions

View File

@ -11,12 +11,9 @@ trigger:
exclude: [push, pull_request]
steps:
- name: fedora-hugo
- name: alpine-hugo
pull: always
image: immawanderer/fedora-hugo:linux-amd64
commands:
- uname -r
- cat /etc/fedora-release
image: immawanderer/alpine-hugo:v0.101.0
- name: alpine-rsync
pull: always
@ -58,12 +55,18 @@ environment:
CGO_ENABLED: 0
steps:
- name: hugo-extended
pull: if-not-exists
image: immawanderer/fedora-hugo:linux-amd64
- name: submodules
image: docker.io/alpine/git:v2.36.2
depends_on: [clone]
commands:
- git submodule init
- git submodule update
- git submodule update --recursive
- name: hugo-extended
pull: always
image: immawanderer/alpine-hugo:hugo-v0.101.0
depends_on: [submodules]
commands:
- hugo version
- hugo --gc=true --minify
@ -167,12 +170,18 @@ depends_on:
- build
steps:
- name: hugo-extended
pull: if-not-exists
image: immawanderer/fedora-hugo:linux-amd64
- name: submodules
image: docker.io/alpine/git:v2.36.2
depends_on: [clone]
commands:
- git submodule init
- git submodule update
- git submodule update --recursive
- name: hugo-extended
pull: always
image: immawanderer/alpine-hugo:hugo-v0.101.0
depends_on: [submodules]
commands:
- hugo version
- hugo --gc=true --minify
@ -232,12 +241,18 @@ environment:
CGO_ENABLED: 0
steps:
- name: hugo-extended
pull: if-not-exists
image: immawanderer/fedora-hugo:linux-amd64
- name: submodules
image: docker.io/alpine/git:v2.36.2
depends_on: [clone]
commands:
- git submodule init
- git submodule update
- git submodule update --recursive
- name: hugo-extended
pull: always
image: immawanderer/alpine-hugo:hugo-v0.101.0
depends_on: [submodules]
commands:
- hugo version
- hugo --gc=true --minify

View File

@ -2,16 +2,23 @@
# refs:
# https://docs.docker.com/develop/develop-images/build_enhancements/#overriding-default-frontends
# https://pythonspeed.com/articles/docker-buildkit/
FROM docker.io/immawanderer/fedora-hugo:linux-amd64 AS hugobuild
FROM docker.io/alpine/git:v2.36.2 AS submodules
WORKDIR /homepage
COPY . .
RUN git submodule init \
&& git submodule update --recursive \
&& hugo version \
&& hugo --minify --gc=true --cleanDestinationDir
RUN git submodule init && \
git submodule update --recursive
FROM docker.io/immawanderer/alpine-hugo:hugo-v0.101.0 AS hugobuild
COPY --from=submodules /homepage/ /homepage/
WORKDIR /homepage
RUN hugo version && \
hugo --minify --gc=true --cleanDestinationDir
FROM docker.io/library/golang:1.18.5-alpine3.16 AS gobuild
COPY --from=hugobuild /homepage/ /homepage/