Update ci.yml to perform a multi-variant build

This commit is contained in:
Roberto Banić
2023-04-13 01:22:57 +02:00
parent f7e3f8ae2a
commit 99d217e8f1
2 changed files with 15 additions and 8 deletions

View File

@@ -24,6 +24,13 @@ jobs:
docker:
runs-on: ubuntu-latest
needs: pytest
strategy:
matrix:
include:
- dockerfile: Dockerfile
variant: alpine
- dockerfile: Dockerfile.slim
variant: slim
steps:
- name: Checkout
uses: actions/checkout@v3
@@ -37,12 +44,12 @@ jobs:
with:
images: ${{ secrets.DOCKER_USERNAME }}/jellyplex-watched # list of Docker images to use as base name for tags
tags: |
type=raw,value=latest,enable={{is_default_branch}}
type=ref,event=branch
type=ref,event=pr
type=semver,pattern={{version}}
type=semver,pattern={{major}}.{{minor}}
type=sha
type=raw,value=${{ matrix.variant }},enable={{is_default_branch}}
type=ref,event=branch,suffix=${{ matrix.variant }}
type=ref,event=pr,suffix=${{ matrix.variant }}
type=semver,pattern={{version}},suffix=${{ matrix.variant }}
type=semver,pattern={{major}}.{{minor}},suffix=${{ matrix.variant }}
type=sha,suffix=${{ matrix.variant }}
- name: Set up QEMU
uses: docker/setup-qemu-action@v2
@@ -63,7 +70,7 @@ jobs:
uses: docker/build-push-action@v3
with:
context: .
file: ./Dockerfile
file: ${{ matrix.dockerfile }}
platforms: linux/amd64,linux/arm64
push: false
tags: jellyplex-watched:action
@@ -74,7 +81,7 @@ jobs:
uses: docker/build-push-action@v3
with:
context: .
file: ./Dockerfile
file: ${{ matrix.dockerfile }}
platforms: linux/amd64,linux/arm64
push: true
tags: ${{ steps.docker_meta.outputs.tags }}