Merge pull request #16 from Guiliano99/compositeUpdate #20
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # SPDX-FileCopyrightText: Copyright 2025 Siemens AG | |
| # | |
| # SPDX-License-Identifier: Apache-2.0 | |
| # This produces base image that contains the dependencies required for the test | |
| # suite, including the build environment for liboqs; and a dev image, which is | |
| # used to run code quality checks in the CI pipeline. It also builds the | |
| # production image, which is meant to be invoked by end-users who want to test | |
| # their CAs. | |
| name: Build and push base docker images | |
| # This is triggered whenever Docker-related changes occur, or when there are | |
| # updates in the dependencies. It can also be started manually. | |
| on: | |
| push: | |
| paths: | |
| - 'data/dockerfiles/Dockerfile.*' | |
| - 'requirements*.txt' | |
| workflow_dispatch: | |
| jobs: | |
| build_and_push: | |
| runs-on: ubuntu-22.04 | |
| steps: | |
| - name: Checkout code | |
| uses: actions/checkout@v4 | |
| - name: Set up Docker Buildx | |
| uses: docker/setup-buildx-action@v3 | |
| - name: Log in to GitHub Container Registry | |
| uses: docker/login-action@v3 | |
| with: | |
| registry: ghcr.io | |
| username: ${{ github.actor }} | |
| password: ${{ secrets.GITHUB_TOKEN }} | |
| - name: Build and push base Docker image | |
| run: | | |
| docker buildx build \ | |
| --tag ghcr.io/${{ github.repository_owner }}/cmp-test-base:latest \ | |
| --push \ | |
| -f data/dockerfiles/Dockerfile.base . | |
| - name: Build and push dev Docker image | |
| run: | | |
| docker buildx build \ | |
| --tag ghcr.io/${{ github.repository_owner }}/cmp-test-dev:latest \ | |
| --build-arg BASE_IMAGE=ghcr.io/${{ github.repository_owner }}/cmp-test-base:latest \ | |
| --push \ | |
| -f data/dockerfiles/Dockerfile.dev . | |
| - name: Build and push the production test suite Docker image | |
| # This one is meant to be directly invoked by end-users who don't want to get into the details | |
| # of how the test suite works, they just want to run it to test their CA. For their convenience, | |
| # we give it a short name, to be invoked as `docker run --rm -it ghcr.io/siemens/cmp-test` | |
| run: | | |
| docker buildx build \ | |
| --tag ghcr.io/${{ github.repository_owner }}/cmp-test:latest \ | |
| --build-arg BASE_IMAGE=ghcr.io/${{ github.repository_owner }}/cmp-test-base:latest \ | |
| --push \ | |
| -f data/dockerfiles/Dockerfile.tests . |