From 822a0c944dde76f19247ff5b561ccebe0982fd0e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Emmanuel=20Fr=C3=A9con?= Date: Sun, 3 Mar 2024 20:04:48 +0100 Subject: [PATCH] Generate one image for each distro in dev --- .github/workflows/dev.yml | 13 ++++++++++--- Dockerfile | 3 ++- 2 files changed, 12 insertions(+), 4 deletions(-) diff --git a/.github/workflows/dev.yml b/.github/workflows/dev.yml index 1c2a121..c8002ce 100644 --- a/.github/workflows/dev.yml +++ b/.github/workflows/dev.yml @@ -8,9 +8,12 @@ on: jobs: build-base: uses: ./.github/workflows/_build.yml + strategy: + matrix: + os: [ubuntu, fedora] with: - image: ${{ github.actor }}/runner-krunvm-base - file: Dockerfile.base + image: ${{ github.actor }}/runner-krunvm-base-${{ matrix.os }} + file: Dockerfile.base.${{ matrix.os }} platforms: linux/amd64 secrets: username: ${{ github.actor }} @@ -20,12 +23,16 @@ jobs: needs: - build-base uses: ./.github/workflows/_build.yml + strategy: + matrix: + os: [ubuntu, fedora] with: - image: ${{ github.actor }}/runner-krunvm + image: ${{ github.actor }}/runner-krunvm-${{ matrix.os }} file: Dockerfile platforms: linux/amd64 build-args: | VERSION=${{ needs.build-base.outputs.version }} + DISTRO=${{ matrix.os }} secrets: username: ${{ github.actor }} password: ${{ secrets.GITHUB_TOKEN }} diff --git a/Dockerfile b/Dockerfile index 5f37782..aac794e 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,6 +1,7 @@ # syntax=docker/dockerfile:1 ARG VERSION=main -FROM ghcr.io/efrecon/runner-krunvm-base:${VERSION} +ARG DISTRO=fedora +FROM ghcr.io/efrecon/runner-krunvm-base-${DISTRO}:${VERSION} ARG INSTALL_VERSION=latest ARG INSTALL_NAMESPACE=/opt/gh-runner-krunvm