From 30e4cae42089c63adb095146ffabec380dee8274 Mon Sep 17 00:00:00 2001 From: Albert Krewinkel Date: Mon, 30 Sep 2024 15:15:41 +0200 Subject: [PATCH 1/3] Build images on all branches --- .github/workflows/build.yaml | 1 - 1 file changed, 1 deletion(-) diff --git a/.github/workflows/build.yaml b/.github/workflows/build.yaml index e579253b..adbb0bf9 100644 --- a/.github/workflows/build.yaml +++ b/.github/workflows/build.yaml @@ -4,7 +4,6 @@ on: push: # Build and publish: configure build via commit message branches: - - master paths-ignore: - '.dockerignore' - '.github/FUNDING.yml' From aad05316a39b7df1eba96ec08cff53b71615d62f Mon Sep 17 00:00:00 2001 From: Albert Krewinkel Date: Mon, 30 Sep 2024 15:19:34 +0200 Subject: [PATCH 2/3] Alpine: define only a single image for building stack=alpine --- alpine/Dockerfile | 13 +++++-------- 1 file changed, 5 insertions(+), 8 deletions(-) diff --git a/alpine/Dockerfile b/alpine/Dockerfile index 9a39c2ef..53148727 100644 --- a/alpine/Dockerfile +++ b/alpine/Dockerfile @@ -1,7 +1,6 @@ -# Base ################################################################## +# Builder ############################################################### ARG base_image_version=3.20 -FROM alpine:$base_image_version AS alpine-builder-base -WORKDIR /app +FROM alpine:$base_image_version AS alpine-builder ARG lua_version=5.4 RUN apk --no-cache add \ @@ -24,12 +23,10 @@ RUN apk --no-cache add \ ENV CABAL_CONFIG=/root/.config/cabal/config COPY cabal.root.config $CABAL_CONFIG -RUN cabal --version \ - && ghc --version \ - && cabal update +RUN cabal --version && \ + ghc --version && \ + cabal update -# Builder ############################################################### -FROM alpine-builder-base AS alpine-builder ARG pandoc_commit=main RUN git clone --branch=$pandoc_commit --depth=1 --quiet \ https://github.com/jgm/pandoc /usr/src/pandoc From ec4f7ed8e0d21c31a743c72c4c01e8846baa35a6 Mon Sep 17 00:00:00 2001 From: Albert Krewinkel Date: Mon, 30 Sep 2024 16:06:57 +0200 Subject: [PATCH 3/3] Don't build pandoc-crossref for edge-alpine stack=alpine --- alpine/Dockerfile | 3 +++ build.sh | 4 ++++ 2 files changed, 7 insertions(+) diff --git a/alpine/Dockerfile b/alpine/Dockerfile index 53148727..bed0361b 100644 --- a/alpine/Dockerfile +++ b/alpine/Dockerfile @@ -60,6 +60,9 @@ RUN find dist-newstyle \ -exec strip '{}' ';' \ -exec cp '{}' /usr/local/bin/ ';' +# Ensure the file exists +RUN touch /usr/local/bin/pandoc-crossref + # Minimal ############################################################### FROM alpine:$base_image_version AS alpine-minimal ARG pandoc_version=edge diff --git a/build.sh b/build.sh index d393ea69..f385c4cf 100755 --- a/build.sh +++ b/build.sh @@ -132,6 +132,10 @@ without_crossref= if [ "$stack" = "static" ]; then extra_packages= without_crossref=true +elif [ "$stack" = "alpine" ] && [ "$pandoc_commit" = "main" ]; then + # There's some kind of issue with pandoc-crossref on Alpine + extra_packages= + without_crossref=true fi ## The pandoc-cli package did not exist pre pandoc 3.