forked from kubev2v/forklift
-
Notifications
You must be signed in to change notification settings - Fork 1
107 lines (99 loc) · 3.58 KB
/
build-push-images.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
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
name: Build and push images
on:
push:
branches:
- main
- release-*
pull_request:
branches:
- main
workflow_dispatch:
jobs:
build_push:
strategy:
fail-fast: false
matrix:
include:
- name: forklift-api
file: build/forklift-api/Containerfile
repo: forklift-api
- name: forklift-controller
file: build/forklift-controller/Containerfile
repo: forklift-controller
- name: forklift-operator
file: build/forklift-operator/Containerfile
repo: forklift-operator
- name: openstack-populator
file: build/openstack-populator/Containerfile
repo: openstack-populator
- name: openstack-populator
file: build/openstack-populator/Containerfile
repo: openstack-populator
- name: forklift-ova-provider-server
file: build/ova-provider-server/Containerfile
repo: forklift-ova-provider-server
- name: ovirt-populator
file: build/ovirt-populator/Containerfile-upstream
repo: ovirt-populator
- name: populator-controller
file: build/populator-controller/Containerfile
repo: populator-controller
- name: forklift-validation
file: build/validation/Containerfile
repo: forklift-validation
- name: virt-v2v
file: build/virt-v2v/Containerfile-upstream
repo: forklift-virt-v2v
runs-on: ubuntu-latest
env:
REGISTRY: quay.io
# Set tag 'latest' on main branch
REGISTRY_TAG: ${{ (github.head_ref||github.ref_name)=='main' && 'latest' || (github.head_ref||github.ref_name) }}
REGISTRY_ORG: kubev2v
steps:
- name: Checkout forklift
uses: actions/checkout@v4
- name: Login to quay.io with bot account
uses: docker/login-action@v3
with:
registry: quay.io
username: ${{ secrets.QUAY_USERNAME }}
password: ${{ secrets.QUAY_TOKEN }}
- name: Build and push ${{ matrix.name }} image to quay.io
uses: docker/build-push-action@v6
with:
push: true
file: "${{ matrix.file }}"
tags: quay.io/mnecas0/${{ matrix.repo }}:${{ env.REGISTRY_TAG }}
build_index:
runs-on: ubuntu-latest
env:
REGISTRY: quay.io
# Set tag 'latest' on main branch
REGISTRY_TAG: ${{ (github.head_ref||github.ref_name)=='main' && 'latest' || (github.head_ref||github.ref_name) }}
REGISTRY_ORG: kubev2v
steps:
- name: Checkout forklift
uses: actions/checkout@v4
- name: Login to quay.io with bot account
uses: docker/login-action@v3
with:
registry: quay.io
username: ${{ secrets.QUAY_USERNAME }}
password: ${{ secrets.QUAY_TOKEN }}
- name: Build and push forklift-operator-bundle image to quay.io
uses: docker/build-push-action@v6
with:
push: true
file: "build/forklift-operator-bundle/Containerfile"
tags: quay.io/mnecas0/forklift-operator-bundle:${{ env.REGISTRY_TAG }}
build-args: |
VERSION=${{ env.REGISTRY_TAG }}
- name: Build and push forklift-operator-index image to quay.io
uses: docker/build-push-action@v6
with:
push: true
file: "build/forklift-operator-index/Containerfile"
tags: quay.io/mnecas0/forklift-operator-index:${{ env.REGISTRY_TAG }}
build-args: |
OPERATOR_BUNDLE_IMAGE=quay.io/kubev2v/forklift-operator-bundle:latest