Add build matrix strategy for Docker flavors and update caching configuration
This commit is contained in:
@@ -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 }}
|
||||||
@@ -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
|
||||||
Reference in New Issue
Block a user