Skip to content
23 changes: 23 additions & 0 deletions .docker/sphinx-latex/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
FROM ubuntu:24.04

LABEL org.opencontainers.image.source="https://github.com/nextcloud/documentation"
LABEL org.opencontainers.image.description="Sphinx + LaTeX build environment for Nextcloud documentation"
LABEL org.opencontainers.image.licenses="AGPL-3.0"

ENV DEBIAN_FRONTEND=noninteractive

RUN apt-get update \
&& apt-get install -y --no-install-recommends \
make \
python3-pip \
latexmk \
tex-gyre \
texlive-fonts-extra \
texlive-fonts-extra-links \
texlive-fonts-recommended \
texlive-latex-extra \
texlive-latex-recommended \
texlive-xetex \
xindy \
&& mktexlsr \
&& rm -rf /var/lib/apt/lists/*
8 changes: 8 additions & 0 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,3 +17,11 @@ updates:
open-pull-requests-limit: 10
cooldown:
default-days: 10
- package-ecosystem: "docker"
directory: "/.docker/sphinx-latex"
schedule:
interval: "weekly"
time: "06:00"
open-pull-requests-limit: 10
cooldown:
default-days: 10
55 changes: 55 additions & 0 deletions .github/workflows/docker-build.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,55 @@
name: Build and publish sphinx-latex Docker image

on:
push:
branches:
- master
paths:
- ".docker/sphinx-latex/**"
pull_request:
paths:
- ".docker/sphinx-latex/**"
workflow_dispatch:

permissions:
contents: read
packages: write

jobs:
build-and-push:
name: Build and push sphinx-latex image
runs-on: ubuntu-latest

steps:
- name: Checkout repository
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2

- name: Set up Docker Buildx
uses: docker/setup-buildx-action@b5ca514318bd6ebac0fb2aedd5d36ec1b5c232a2 # v3.10.0

- name: Login to GitHub Container Registry
if: github.event_name != 'pull_request'
uses: docker/login-action@74a5d142397b4f367a81961eba4e8cd7edddf772 # v3.4.0
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}

- name: Extract metadata for Docker
id: meta
uses: docker/metadata-action@902fa8ec7d6ecbf8d84d538b9b233a880e428804 # v5.7.0
with:
images: ghcr.io/${{ github.repository }}/sphinx-latex
tags: |
type=raw,value=latest,enable={{is_default_branch}}
type=sha,prefix=sha-

- name: Build and push Docker image
uses: docker/build-push-action@14487ce63c7a62a4a324b0bfb37086795e31c6c1 # v6.16.0
with:
context: .docker/sphinx-latex
push: ${{ github.event_name != 'pull_request' }}
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}
cache-from: type=registry,ref=ghcr.io/${{ github.repository }}/sphinx-latex:latest
cache-to: type=inline
Loading