Add build matrix strategy for Docker flavors and update caching configuration
Some checks failed
Build Docker Image / build (default) (push) Failing after 5m34s
Build Docker Image / build (python) (push) Failing after 7m56s

This commit is contained in:
2025-02-16 19:37:08 +01:00
parent 5eab51a771
commit 702cafd0ef
2 changed files with 14 additions and 5 deletions

View File

@@ -10,6 +10,9 @@ on:
jobs: jobs:
build: build:
strategy:
matrix:
flavor: [default, python]
runs-on: docker-builder runs-on: docker-builder
steps: steps:
- uses: actions/checkout@v4 - uses: actions/checkout@v4
@@ -24,7 +27,8 @@ jobs:
images: | images: |
git.pollinger.dev/public/texlive git.pollinger.dev/public/texlive
tags: | tags: |
type=raw,value=latest,enable=${{ github.ref == 'refs/heads/main' }} type=raw,value=latest,enable=${{ github.ref == 'refs/heads/main' && matrix.flavor == 'default' }}
type=raw,value=${{ matrix.flavor }},enable=${{ github.ref == 'refs/heads/main' }}
- name: Set up Docker Buildx - name: Set up Docker Buildx
@@ -44,8 +48,9 @@ jobs:
with: with:
context: . context: .
file: ./Dockerfile file: ./Dockerfile
target: ${{ matrix.flavor }}
push: true push: true
tags: ${{ steps.meta.outputs.tags }} tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }} labels: ${{ steps.meta.outputs.labels }}
cache-from: type=gha cache-from: type=registry,ref=git.pollinger.dev/public/texlive:build-cache-${{ matrix.flavor }}
cache-to: type=gha,mode=max,image-manifest=true,oci-mediatypes=true,type=registry,ref=git.pollinger.dev/public/texlive:build-cache cache-to: mode=max,image-manifest=true,oci-mediatypes=true,type=registry,ref=git.pollinger.dev/public/texlive:build-cache-${{ matrix.flavor }}

View File

@@ -1,4 +1,8 @@
FROM texlive/texlive:latest FROM texlive/texlive:latest AS default
RUN apt update RUN apt update
RUN apt install graphviz nodejs -y RUN apt install graphviz nodejs -y
RUN luaotfload-tool --update RUN luaotfload-tool --update
FROM default AS python
RUN apt update
RUN apt install python3 python3-pip -y