Skip to content

Commit 19470c3

Browse files
authored
Merge pull request #14493 from nextcloud/copilot/extract-docker-part
2 parents 9fdb107 + 823dbf7 commit 19470c3

3 files changed

Lines changed: 86 additions & 0 deletions

File tree

.docker/sphinx-latex/Dockerfile

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
FROM ubuntu:24.04
2+
3+
LABEL org.opencontainers.image.source="https://github.com/nextcloud/documentation"
4+
LABEL org.opencontainers.image.description="Sphinx + LaTeX build environment for Nextcloud documentation"
5+
LABEL org.opencontainers.image.licenses="AGPL-3.0"
6+
7+
ENV DEBIAN_FRONTEND=noninteractive
8+
9+
RUN apt-get update \
10+
&& apt-get install -y --no-install-recommends \
11+
make \
12+
python3-pip \
13+
latexmk \
14+
tex-gyre \
15+
texlive-fonts-extra \
16+
texlive-fonts-extra-links \
17+
texlive-fonts-recommended \
18+
texlive-latex-extra \
19+
texlive-latex-recommended \
20+
texlive-xetex \
21+
xindy \
22+
&& mktexlsr \
23+
&& rm -rf /var/lib/apt/lists/*

.github/dependabot.yml

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,3 +17,11 @@ updates:
1717
open-pull-requests-limit: 10
1818
cooldown:
1919
default-days: 10
20+
- package-ecosystem: "docker"
21+
directory: "/.docker/sphinx-latex"
22+
schedule:
23+
interval: "weekly"
24+
time: "06:00"
25+
open-pull-requests-limit: 10
26+
cooldown:
27+
default-days: 10

.github/workflows/docker-build.yml

Lines changed: 55 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,55 @@
1+
name: Build and publish sphinx-latex Docker image
2+
3+
on:
4+
push:
5+
branches:
6+
- master
7+
paths:
8+
- ".docker/sphinx-latex/**"
9+
pull_request:
10+
paths:
11+
- ".docker/sphinx-latex/**"
12+
workflow_dispatch:
13+
14+
permissions:
15+
contents: read
16+
packages: write
17+
18+
jobs:
19+
build-and-push:
20+
name: Build and push sphinx-latex image
21+
runs-on: ubuntu-latest
22+
23+
steps:
24+
- name: Checkout repository
25+
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
26+
27+
- name: Set up Docker Buildx
28+
uses: docker/setup-buildx-action@b5ca514318bd6ebac0fb2aedd5d36ec1b5c232a2 # v3.10.0
29+
30+
- name: Login to GitHub Container Registry
31+
if: github.event_name != 'pull_request'
32+
uses: docker/login-action@74a5d142397b4f367a81961eba4e8cd7edddf772 # v3.4.0
33+
with:
34+
registry: ghcr.io
35+
username: ${{ github.actor }}
36+
password: ${{ secrets.GITHUB_TOKEN }}
37+
38+
- name: Extract metadata for Docker
39+
id: meta
40+
uses: docker/metadata-action@902fa8ec7d6ecbf8d84d538b9b233a880e428804 # v5.7.0
41+
with:
42+
images: ghcr.io/${{ github.repository }}/sphinx-latex
43+
tags: |
44+
type=raw,value=latest,enable={{is_default_branch}}
45+
type=sha,prefix=sha-
46+
47+
- name: Build and push Docker image
48+
uses: docker/build-push-action@14487ce63c7a62a4a324b0bfb37086795e31c6c1 # v6.16.0
49+
with:
50+
context: .docker/sphinx-latex
51+
push: ${{ github.event_name != 'pull_request' }}
52+
tags: ${{ steps.meta.outputs.tags }}
53+
labels: ${{ steps.meta.outputs.labels }}
54+
cache-from: type=registry,ref=ghcr.io/${{ github.repository }}/sphinx-latex:latest
55+
cache-to: type=inline

0 commit comments

Comments
 (0)