Skip to content

Build images and push to quay.io #127

Build images and push to quay.io

Build images and push to quay.io #127

Workflow file for this run

---
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 }}