Skip to content

Use matrix build

Use matrix build #33

Workflow file for this run

name: docker
on:
push:
env:
IMAGE_FQDN: ghcr.io/kontextwork/zimbra-builder
jobs:
docker:
strategy:
matrix:
TARGET_DISTRO: [ "ubuntu:20.04" ]
runs-on: ubuntu-latest
steps:
- name: Checkout us
uses: actions/checkout@v4
with:
path: builder
- name: Checkout zimbra-build-scripts
uses: actions/checkout@v4
with:
repository: ianw1974/zimbra-build-scripts
ref: main
path: zimbra-build-scripts
- name: Set up QEMU
uses: docker/setup-qemu-action@v2
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v2
- name: Login to GHCR
uses: docker/login-action@v2
with:
registry: ghcr.io
username: ${{ github.repository_owner }}
password: ${{ github.token }}
- name: Get docker tag
run: |
export DISTRO=${{ matrix.TARGET_DISTRO }}
export TAG=${DISTRO//:/-}
echo "DOCKER_TAG=${TAG}" >> $GITHUB_ENV
- name: Build builder
uses: docker/build-push-action@v3
with:
context: zimbra-build-scripts
platforms: linux/amd64
push: true
build-args: |
# actually that's the distro to build ON and FOR
RELEASE=${{ matrix.TARGET_DISTRO }}
tags:
${{ env.IMAGE_FQDN }}:latest
${{ env.IMAGE_FQDN }}:${{ env.DOCKER_TAG }}