Skip to content

Commit

Permalink
Apply CI job to build the sonobuoy image for kaas conformance
Browse files Browse the repository at this point in the history
testing

Updates `.github/workflows/build-docker.yml`

Signed-off-by: Toni.Finger <[email protected]>
  • Loading branch information
tonifinger committed Oct 28, 2024
1 parent ced5954 commit 3b70454
Showing 1 changed file with 35 additions and 3 deletions.
38 changes: 35 additions & 3 deletions .github/workflows/build-docker.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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
Expand All @@ -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 }}

0 comments on commit 3b70454

Please sign in to comment.