From e0e8c5915c36032936e6af7cbd714260f9e5c8ba Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bob=20Dr=C3=B6ge?= Date: Sun, 14 Apr 2024 10:28:51 +0200 Subject: [PATCH] build all images, only build for risc-v for debian sid images --- .../workflows/build-publish-containers.yml | 21 ++++++++++++++----- 1 file changed, 16 insertions(+), 5 deletions(-) diff --git a/.github/workflows/build-publish-containers.yml b/.github/workflows/build-publish-containers.yml index 528bb51d..a7c9b607 100644 --- a/.github/workflows/build-publish-containers.yml +++ b/.github/workflows/build-publish-containers.yml @@ -32,9 +32,14 @@ jobs: contents: read strategy: matrix: - #tag: ['client:centos7', 'build-node:debian11'] - tag: ['build-node:debian-sid'] + tag: ['client:centos7', 'build-node:debian11', 'build-node:debian-sid'] platform: [amd64, arm64, riscv64] + exclude: + # exclude images that don't support RISC-V + - tag: client:centos7 + platform: riscv64 + - tag: build-node:debian11 + platform: riscv64 steps: - name: Check out the repo @@ -92,8 +97,7 @@ jobs: contents: read strategy: matrix: - #tag: ['client:centos7', 'build-node:debian11', 'build-node:debian-sid'] - tag: ['build-node:debian-sid'] + tag: ['client:centos7', 'build-node:debian11', 'build-node:debian-sid'] steps: - name: Login to GitHub Container Registry if: github.event_name != 'pull_request' @@ -108,13 +112,20 @@ jobs: echo REPOSITORY_OWNER=$(echo ${{ github.repository_owner }} | tr '[:upper:]' '[:lower:]') >> $GITHUB_ENV - name: Create the final image using "docker buildx imagetools create" - if: github.event_name != 'pull_request' + if: github.event_name != 'pull_request' && matrix.tag == 'build-node:debian-sid' run: | docker buildx imagetools create -t ghcr.io/${{ env.REPOSITORY_OWNER }}/${{ matrix.tag }} \ ghcr.io/${{ env.REPOSITORY_OWNER }}/${{ matrix.tag }}-amd64 \ ghcr.io/${{ env.REPOSITORY_OWNER }}/${{ matrix.tag }}-arm64 \ ghcr.io/${{ env.REPOSITORY_OWNER }}/${{ matrix.tag }}-riscv64 + - name: Create the final image using "docker buildx imagetools create" + if: github.event_name != 'pull_request' && matrix.tag != 'build-node:debian-sid' + run: | + docker buildx imagetools create -t ghcr.io/${{ env.REPOSITORY_OWNER }}/${{ matrix.tag }} \ + ghcr.io/${{ env.REPOSITORY_OWNER }}/${{ matrix.tag }}-amd64 \ + ghcr.io/${{ env.REPOSITORY_OWNER }}/${{ matrix.tag }}-arm64 + - name: Inspect the final image if: github.event_name != 'pull_request' run: docker buildx imagetools inspect ghcr.io/${{ env.REPOSITORY_OWNER }}/${{ matrix.tag }}