Containers #169
This file contains 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: Red Hat, Inc. | |
# SPDX-License-Identifier: GPL-2.0-or-later | |
name: Containers | |
on: | |
# Be able to run the job manually when needed | |
# (Actions -> Containers -> Run workflow) | |
workflow_dispatch: | |
# Build every week on Sunday 00:00 | |
schedule: | |
- cron: '0 0 * * 0' | |
env: | |
IMAGE_REGISTRY: quay.io | |
can_push: ${{ github.repository_owner == 'oVirt' }} | |
jobs: | |
container-network: | |
runs-on: ubuntu-latest | |
strategy: | |
matrix: | |
container: [ functional, integration, unit ] | |
steps: | |
- uses: ovirt/checkout-action@main | |
- name: Install dependencies | |
run: | | |
sudo apt update | |
sudo apt install podman | |
- name: Build container images | |
working-directory: docker/network | |
run: make ${{ matrix.container }} | |
- name: Push to Quay.io | |
if: ${{ env.can_push == 'true' }} | |
id: push-to-quay | |
uses: redhat-actions/push-to-registry@v2 | |
with: | |
image: ovirt/vdsm-network-tests-${{ matrix.container }} | |
tags: alma-9 centos-8 centos-9 | |
registry: ${{ env.IMAGE_REGISTRY }} | |
username: ${{ secrets.QUAY_USERNAME }} | |
password: ${{ secrets.QUAY_TOKEN }} | |
- name: Print image url | |
if: ${{ env.can_push == 'true' }} | |
run: echo "Image pushed to ${{ steps.push-to-quay.outputs.registry-paths }}" | |
container-test: | |
runs-on: ubuntu-latest | |
strategy: | |
matrix: | |
distro: [ centos-8, centos-9, alma-9 ] | |
steps: | |
- uses: ovirt/checkout-action@main | |
- name: Install dependencies | |
run: | | |
sudo apt update | |
sudo apt install podman | |
- name: Build container images | |
working-directory: docker | |
run: make ${{ matrix.distro }} | |
- name: Push to Quay.io | |
if: ${{ env.can_push == 'true' }} | |
id: push-to-quay | |
uses: redhat-actions/push-to-registry@v2 | |
with: | |
image: ovirt/vdsm-test | |
tags: ${{ matrix.distro }} | |
registry: ${{ env.IMAGE_REGISTRY }} | |
username: ${{ secrets.QUAY_USERNAME }} | |
password: ${{ secrets.QUAY_TOKEN }} | |
- name: Print image url | |
if: ${{ env.can_push == 'true' }} | |
run: echo "Image pushed to ${{ steps.push-to-quay.outputs.registry-paths }}" |