From 3b70454bc6078de6596b796c651b1bffdd744b45 Mon Sep 17 00:00:00 2001 From: Toni Finger Date: Mon, 28 Oct 2024 14:30:42 +0100 Subject: [PATCH] Apply CI job to build the sonobuoy image for kaas conformance testing Updates `.github/workflows/build-docker.yml` Signed-off-by: Toni.Finger --- .github/workflows/build-docker.yml | 38 +++++++++++++++++++++++++++--- 1 file changed, 35 insertions(+), 3 deletions(-) diff --git a/.github/workflows/build-docker.yml b/.github/workflows/build-docker.yml index e53dc2502..f600ff872 100644 --- a/.github/workflows/build-docker.yml +++ b/.github/workflows/build-docker.yml @@ -11,10 +11,11 @@ on: env: REGISTRY: ghcr.io - IMAGE_NAME: scs-compliance-check + IMAGE_NAME_COMPLIANCE_CHECK: scs-compliance-check + IMAGE_NAME_KAAS_SONOBUOY: scs-kaas-compliance-tests jobs: - build-and-push-image: + build-and-push-scs-compliance-check-image: runs-on: ubuntu-latest permissions: contents: read @@ -35,7 +36,7 @@ jobs: id: meta uses: docker/metadata-action@v5 with: - images: ${{ env.REGISTRY }}/${{ github.repository_owner }}/${{ env.IMAGE_NAME }} + images: ${{ env.REGISTRY }}/${{ github.repository_owner }}/${{ env.IMAGE_NAME_COMPLIANCE_CHECK }} - name: Build and push Docker image uses: docker/build-push-action@v5 @@ -44,3 +45,34 @@ jobs: push: true tags: ${{ steps.meta.outputs.tags }} labels: ${{ steps.meta.outputs.labels }} + + build-and-push-scs-compliance-check-image: + runs-on: ubuntu-latest + permissions: + contents: read + packages: write + + steps: + - name: Checkout repository + uses: actions/checkout@v4 + + - name: Log in to the Container registry + uses: docker/login-action@v3 + with: + registry: ${{ env.REGISTRY }} + username: ${{ github.actor }} + password: ${{ secrets.GITHUB_TOKEN }} + + - name: Extract metadata (tags, labels) for Docker + id: meta + uses: docker/metadata-action@v5 + with: + images: ${{ env.REGISTRY }}/${{ github.repository_owner }}/${{ env.IMAGE_NAME_KAAS_SONOBUOY }} + + - name: Build and push Docker image + uses: docker/build-push-action@v5 + with: + context: "./Tests/kaas/kaas-sonobuoy-tests" + push: true + tags: ${{ steps.meta.outputs.tags }} + labels: ${{ steps.meta.outputs.labels }}