Skip to content

Commit

Permalink
Split latex setup out of the default debian container
Browse files Browse the repository at this point in the history
  • Loading branch information
rumpelsepp committed Nov 6, 2024
1 parent a63a816 commit 1b67abf
Show file tree
Hide file tree
Showing 3 changed files with 63 additions and 3 deletions.
48 changes: 47 additions & 1 deletion .github/workflows/publish-debian-container.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ env:
IMAGE_NAME: ${{ github.repository }}

jobs:
build-and-push-image:
build-and-push-debian-image:
runs-on: ubuntu-latest
# Sets the permissions granted to the `GITHUB_TOKEN` for the actions in this job.
permissions:
Expand Down Expand Up @@ -61,3 +61,49 @@ jobs:
labels: ${{ steps.meta.outputs.labels }}
cache-from: type=gha
cache-to: type=gha,mode=max

build-and-push-debian-large-image:
needs: build-and-push-debian-image
runs-on: ubuntu-latest
# Sets the permissions granted to the `GITHUB_TOKEN` for the actions in this job.
permissions:
contents: read
packages: write
attestations: write
id-token: write

steps:
- name: Checkout repository
uses: actions/checkout@v4

# https://github.com/actions/runner-images/issues/2840#issuecomment-1284059930
- name: Free disk space
uses: ./.github/actions/disk-cleanup

- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3

- name: Log in to the Container registry
uses: docker/login-action@v3
with:
registry: ${{ env.REGISTRY }}
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}

- name: Extract metadata (tags, labels) for Docker
id: meta
uses: docker/metadata-action@v5
with:
images: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}

- name: Build and push Debian container image
id: push
uses: docker/build-push-action@v6
with:
push: true
context: containers/debian-large
file: containers/debian/Containerfile
tags: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}:debian-large
labels: ${{ steps.meta.outputs.labels }}
cache-from: type=gha
cache-to: type=gha,mode=max
14 changes: 14 additions & 0 deletions containers/debian-large/Containerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
# SPDX-FileCopyrightText: Stefan Tatschner
# SPDX-License-Identifier: MIT

FROM ghcr.io/rumpelsepp/devman:debian

LABEL org.opencontainers.image.authors="[email protected]"
LABEL org.opencontainers.image.licenses="MIT"
LABEL org.opencontainers.image.title="Debian Large Devman"
LABEL org.opencontainers.image.base.name="ghcr.io/rumpelsepp/devman:debian"

RUN apt-get update

RUN DEBIAN_FRONTEND=noninteractive apt-get install -y texlive-full
RUN DEBIAN_FRONTEND=noninteractive apt-get install -y latexmk
4 changes: 2 additions & 2 deletions containers/debian/Containerfile
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,8 @@ LABEL org.opencontainers.image.base.name="docker.io/debian:trixie"
RUN apt-get update

# Cache as much as possible here.
RUN DEBIAN_FRONTEND=noninteractive apt-get install -y texlive-full
RUN DEBIAN_FRONTEND=noninteractive apt-get install -y latexmk
RUN DEBIAN_FRONTEND=noninteractive apt-get install -y devscripts
RUN DEBIAN_FRONTEND=noninteractive apt-get install -y dh-make
RUN DEBIAN_FRONTEND=noninteractive apt-get install -y xindy
RUN DEBIAN_FRONTEND=noninteractive apt-get install -y atuin
RUN DEBIAN_FRONTEND=noninteractive apt-get install -y apt-utils
Expand Down

0 comments on commit 1b67abf

Please sign in to comment.