Skip to content

Commit

Permalink
CI: add build test images to ghcr.io
Browse files Browse the repository at this point in the history
This is the first step to fix SUSE/spacewalk#25948
We need the test images in ghcr.io so we can pull them and push them
to the authenticated and non-authenticated registries that we use when
running tests that build container images based on the content of the
registries.

Signed-off-by: Jordi Massaguer Pla <[email protected]>
  • Loading branch information
jordimassaguerpla committed Feb 25, 2025
1 parent 7b5a8fe commit f8840a3
Show file tree
Hide file tree
Showing 3 changed files with 65 additions and 0 deletions.
62 changes: 62 additions & 0 deletions .github/workflows/build_containers.yml
Original file line number Diff line number Diff line change
Expand Up @@ -314,3 +314,65 @@ jobs:
push: true
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}

build-and-push-opensuse-test-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 }}/${{ env.IMAGE_NAME }}/opensuse

- name: Build and push Docker image
uses: docker/build-push-action@v5
with:
context: ./testsuite/dockerfiles/opensuse/leap/15.4
push: true
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}

build-and-push-uyuni-master-testsuite-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 }}/${{ env.IMAGE_NAME }}/uyuni-master-testsuite

- name: Build and push Docker image
uses: docker/build-push-action@v5
with:
context: ./testsuite/dockerfiles/uyuni-master-testsuite
push: true
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}
2 changes: 2 additions & 0 deletions testsuite/dockerfiles/opensuse/leap/15.4/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
FROM opensuse/leap:15.4

1 change: 1 addition & 0 deletions testsuite/dockerfiles/uyuni-master-testsuite/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
FROM registry.opensuse.org/systemsmanagement/uyuni/master/docker/containers/uyuni-master-testsuite

0 comments on commit f8840a3

Please sign in to comment.