diff --git a/.github/workflows/edge.yaml b/.github/workflows/edge.yaml index d33047e..8d2cd55 100644 --- a/.github/workflows/edge.yaml +++ b/.github/workflows/edge.yaml @@ -4,6 +4,7 @@ on: push: paths: - edge/alpine/Dockerfile + - .github/workflows/edge.yaml schedule: # Rebuild on the 17th of each month - cron: '19 1 17 * *' @@ -47,21 +48,46 @@ jobs: driver: cloud endpoint: "pandoc/multiarch" - - name: Docker meta - id: meta + - name: Meta for minimal + id: meta-minimal uses: docker/metadata-action@v5 with: images: | pandoc/minimal ghcr.io/pandoc/minimal - - name: Build and push edge image - uses: docker/build-push-action@v5 + - name: 'pandoc/minimal:edge-alpine' + uses: docker/build-push-action@v6 with: context: '.' file: 'edge/alpine/Dockerfile' - labels: ${{ steps.meta.outputs.labels }} + labels: ${{ steps.meta-minimal.outputs.labels }} platforms: linux/amd64,linux/arm64 push: ${{ env.PUSH_IMAGE }} - tags: 'pandoc/minimal:edge-alpine' + target: minimal + tags: | + pandoc/minimal:edge-alpine + ghcr.io/pandoc/minimal:edge-alpine + + - name: Meta for core + id: meta-core + uses: docker/metadata-action@v5 + with: + images: | + pandoc/core + ghcr.io/pandoc/core + + - name: 'pandoc/core:edge-alpine' + uses: docker/build-push-action@v6 + with: + file: 'edge/alpine/Dockerfile' + labels: ${{ steps.meta-core.outputs.labels }} + platforms: linux/amd64,linux/arm64 + push: ${{ env.PUSH_IMAGE }} + target: core + tags: | + pandoc/core:edge + pandoc/core:edge-alpine + ghcr.io/pandoc/core:edge + ghcr.io/pandoc/core:edge-alpine diff --git a/edge/alpine/Dockerfile b/edge/alpine/Dockerfile index 9b28311..9972282 100644 --- a/edge/alpine/Dockerfile +++ b/edge/alpine/Dockerfile @@ -17,7 +17,6 @@ RUN apk --no-cache add \ yaml \ zlib-dev -RUN cabal update RUN < cabal.project.local; # Build pandoc and pandoc-crossref. The `allow-newer` is required for # when pandoc-crossref has not been updated yet, but we want to build # anyway. +cabal update cabal build \ --jobs \ --disable-tests \ @@ -51,10 +51,12 @@ find dist-newstyle \ -name 'pandoc*' -type f -perm -u+x \ -exec strip '{}' ';' \ -exec cp '{}' /usr/local/bin/ ';' + +rm -rf /root/.cabal EOF # Minimal ############################################################### -FROM alpine:$base_image_version AS alpine-minimal +FROM alpine:$base_image_version AS minimal ARG pandoc_version=edge LABEL maintainer='Albert Krewinkel ' LABEL org.pandoc.maintainer='Albert Krewinkel ' @@ -76,3 +78,13 @@ RUN ln -s /usr/local/bin/pandoc /usr/local/bin/pandoc-lua && \ gmp \ libffi \ lua5.4 + +# Core ################################################################## +FROM minimal AS core +COPY --from=alpine-builder \ + /usr/local/bin/pandoc-crossref \ + /usr/local/bin/ + +# Additional packages frequently used during conversions +# NOTE: `libsrvg`, pandoc uses `rsvg-convert` for working with svg images. +RUN apk --no-cache add rsvg-convert