This commit is contained in:
parent
c1f836579c
commit
7d91e1e25c
@ -10,7 +10,8 @@ steps:
|
|||||||
from_secret: container_registry_username
|
from_secret: container_registry_username
|
||||||
password:
|
password:
|
||||||
from_secret: container_registry_password
|
from_secret: container_registry_password
|
||||||
build-args: "BASE_URL=https://minimal-setups.hottis.de"
|
build-args: "BASE_URL=https://minimal-setups.hottis.de, RELEASETAG=${CI_COMMIT_SHA}"
|
||||||
|
|
||||||
dockerfile: Dockerfile
|
dockerfile: Dockerfile
|
||||||
when:
|
when:
|
||||||
- event: [push,tag]
|
- event: [push,tag]
|
||||||
|
@ -1,9 +1,11 @@
|
|||||||
# builder
|
# builder
|
||||||
FROM hugomods/hugo:base-non-root AS builder
|
FROM hugomods/hugo:base-non-root AS builder
|
||||||
ARG BASE_URL ""
|
ARG BASE_URL ""
|
||||||
|
ARG RELEASETAG "unset"
|
||||||
# --chown is required since kaniko in woodpecker otherwise copies as root and
|
# --chown is required since kaniko in woodpecker otherwise copies as root and
|
||||||
# the hugo command below fails since it is executed as hugo
|
# the hugo command below fails since it is executed as hugo
|
||||||
COPY --chown=hugo:hugo content/ /src
|
COPY --chown=hugo:hugo content/ /src
|
||||||
|
RUN sed -i 's/%RELEASETAG%/'${RELEASETAG}'/' /src/content/about.md
|
||||||
RUN if [ "$BASE_URL" = ""]; then hugo; else hugo -b $BASE_URL; fi
|
RUN if [ "$BASE_URL" = ""]; then hugo; else hugo -b $BASE_URL; fi
|
||||||
|
|
||||||
# server
|
# server
|
||||||
|
@ -3,13 +3,12 @@ title: "About"
|
|||||||
menu:
|
menu:
|
||||||
main:
|
main:
|
||||||
weight: 1
|
weight: 1
|
||||||
releasetag: '{{ getenv "HUGO_RELEASETAG"}}'
|
|
||||||
---
|
---
|
||||||
## About
|
## About
|
||||||
|
|
||||||
This is the about page
|
This is the about page
|
||||||
|
|
||||||
{{ .Params.releasetag }}
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
%RELEASETAG%
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
baseURL = 'https://example.org/'
|
baseURL = 'https://example.org/'
|
||||||
languageCode = 'en-us'
|
languageCode = 'en-us'
|
||||||
title = 'Minimal Setups {{ getenv "HUGO_RELEASETAG }}'
|
title = 'Minimal Setups {{ getenv "HUGO_RELEASETAG" }}'
|
||||||
theme = "ananke"
|
theme = "ananke"
|
||||||
sectionPagesMenu = "main"
|
sectionPagesMenu = "main"
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user