static page builder for ci

main
Ricard Illa 2022-08-22 12:20:17 +02:00
parent ed6ca7774e
commit 6d8109d9a0
No known key found for this signature in database
GPG Key ID: F69A672B72E54902
2 changed files with 34 additions and 0 deletions

View File

@ -0,0 +1,15 @@
# maybe switch to a stable version of alpine once tidyhtml is avaiblable there
FROM alpine:edge
# py3-pip is only needed to install j2cli, but python3 and py3-setuptools are
# also needed to run it
RUN apk add --no-cache \
findutils \
make \
py3-pip \
py3-setuptools \
python3 \
sassc \
tidyhtml && \
pip install j2cli[yaml] && \
apk del py3-pip

View File

@ -0,0 +1,19 @@
IMG_NAME=static-page-builder
REGISTRY=registry.monotremata.xyz
IMG=$(REGISTRY)/$(IMG_NAME)
PLATFORMS=linux/amd64,linux/arm64
.PHONY: build push buildx
build: Dockerfile
docker build -t $(IMG) .
push: build
docker image push $(IMG)
buildx: Dockerfile
docker buildx build \
--platform $(PLATFORMS) \
--tag $(IMG) \
--push \
.