ci,dockerfile: switch to immawanderer/alpine-hugo
All checks were successful
continuous-integration/drone/push Build is passing
All checks were successful
continuous-integration/drone/push Build is passing
This commit is contained in:
parent
051903761c
commit
6e1039893d
49
.drone.yml
49
.drone.yml
@ -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
|
||||
|
||||
|
17
Dockerfile
17
Dockerfile
@ -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/
|
||||
|
Loading…
Reference in New Issue
Block a user