-
Notifications
You must be signed in to change notification settings - Fork 23
89 lines (79 loc) · 2.95 KB
/
build.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
---
name: Build images and push to quay.io
on:
# Start build when GitHub release is published
release:
types: [published]
# Allow manual trigger
workflow_dispatch:
# Rebuild every Monday at 4:30 UTC
schedule:
- cron: '30 4 * * 1'
jobs:
# this job will only be triggered when one of the above trigger condition is met
deployments:
name: Build and Push to quay.io
runs-on: ubuntu-latest
steps:
- name: Get latest tag
uses: oprypin/find-latest-tag@v1
with:
repository: release-engineering/iib
releases-only: true
prefix: 'v'
id: iibtag
- name: Checkout code
uses: actions/checkout@v4
with:
ref: ${{ github.event.release.tag_name || steps.iibtag.outputs.tag }}
- name: Build iib-worker
id: build-iib-worker
uses: redhat-actions/buildah-build@v2
with:
image: iib-worker
tags: ${{ github.event.release.tag_name || steps.iibtag.outputs.tag }} latest
dockerfiles: |
./docker/Dockerfile-workers
- name: Build iib-api
id: build-iib-api
uses: redhat-actions/buildah-build@v2
with:
image: iib-api
tags: ${{ github.event.release.tag_name || steps.iibtag.outputs.tag }} latest
dockerfiles: |
./docker/Dockerfile-api
- name: Build iib-message-broker
id: build-iib-message-broker
uses: redhat-actions/buildah-build@v2
with:
image: iib-message-broker
tags: ${{ github.event.release.tag_name || steps.iibtag.outputs.tag }} latest
dockerfiles: |
./docker/message_broker/Dockerfile
- name: Push iib-worker to quay.io
id: push-iib-worker
uses: redhat-actions/[email protected]
with:
image: ${{ steps.build-iib-worker.outputs.image }}
tags: ${{ steps.build-iib-worker.outputs.tags }}
registry: quay.io/exd-guild-hello-operator
username: ${{ secrets.REGISTRY_QUAY_IO_USER }}
password: ${{ secrets.REGISTRY_QUAY_IO_PASSWORD }}
- name: Push iib-api to quay.io
id: push-iib-api
uses: redhat-actions/[email protected]
with:
image: ${{ steps.build-iib-api.outputs.image }}
tags: ${{ steps.build-iib-api.outputs.tags }}
registry: quay.io/exd-guild-hello-operator
username: ${{ secrets.REGISTRY_QUAY_IO_USER }}
password: ${{ secrets.REGISTRY_QUAY_IO_PASSWORD }}
- name: Push iib-message-broker to quay.io
id: push-iib-message-broker
uses: redhat-actions/[email protected]
with:
image: ${{ steps.build-iib-message-broker.outputs.image }}
tags: ${{ steps.build-iib-message-broker.outputs.tags }}
registry: quay.io/exd-guild-hello-operator
username: ${{ secrets.REGISTRY_QUAY_IO_USER }}
password: ${{ secrets.REGISTRY_QUAY_IO_PASSWORD }}