Add build matrix strategy for Docker flavors and update caching configuration
This commit is contained in:
@@ -10,6 +10,9 @@ on:
|
||||
|
||||
jobs:
|
||||
build:
|
||||
strategy:
|
||||
matrix:
|
||||
flavor: [default, python]
|
||||
runs-on: docker-builder
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
@@ -24,7 +27,8 @@ jobs:
|
||||
images: |
|
||||
git.pollinger.dev/public/texlive
|
||||
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
|
||||
@@ -44,8 +48,9 @@ jobs:
|
||||
with:
|
||||
context: .
|
||||
file: ./Dockerfile
|
||||
target: ${{ matrix.flavor }}
|
||||
push: true
|
||||
tags: ${{ steps.meta.outputs.tags }}
|
||||
labels: ${{ steps.meta.outputs.labels }}
|
||||
cache-from: type=gha
|
||||
cache-to: type=gha,mode=max,image-manifest=true,oci-mediatypes=true,type=registry,ref=git.pollinger.dev/public/texlive:build-cache
|
||||
cache-from: type=registry,ref=git.pollinger.dev/public/texlive:build-cache-${{ matrix.flavor }}
|
||||
cache-to: mode=max,image-manifest=true,oci-mediatypes=true,type=registry,ref=git.pollinger.dev/public/texlive:build-cache-${{ matrix.flavor }}
|
||||
Reference in New Issue
Block a user