Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Apply CI job to build the sonobuoy image for kaas conformance testing #793

Open
wants to merge 3 commits into
base: main
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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-kaas-compliance-tests-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 }}