forked from oVirt/ovirt-imageio
-
Notifications
You must be signed in to change notification settings - Fork 0
64 lines (63 loc) · 2.04 KB
/
containers.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
# 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 Monday 00:00
schedule:
- cron: '0 0 * * 1'
env:
IMAGE_REGISTRY: quay.io/ovirt
can_push: ${{ github.repository_owner == 'oVirt' }}
jobs:
test-containers:
runs-on: ubuntu-latest
strategy:
matrix:
distro: [ centos-8, centos-9, fedora-36, fedora-37, fedora-38 ]
steps:
- uses: actions/checkout@v2
- name: Install dependencies
run: |
sudo apt update
sudo apt install podman
- name: Build container images
working-directory: containers
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-imageio-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 }}"
container:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Install dependencies
run: |
sudo apt update
sudo apt install podman
- name: Build container images
run: make 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-imageio
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 }}"