Skip to content

Commit

Permalink
Enable weekly rebuild of IIB images and manual trigger of GitHub acti…
Browse files Browse the repository at this point in the history
…on to build and push images

[CLOUDDST-12355]
  • Loading branch information
lipoja committed Dec 6, 2022
1 parent e74fe17 commit 7e519c3
Showing 1 changed file with 19 additions and 5 deletions.
24 changes: 19 additions & 5 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,27 +2,41 @@
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 release is published
# 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@v2
with:
ref: ${{ github.event.release.tag_name }}
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 }} latest
tags: ${{ github.event.release.tag_name || steps.iibtag.outputs.tag }} latest
dockerfiles: |
./docker/Dockerfile-workers
Expand All @@ -31,7 +45,7 @@ jobs:
uses: redhat-actions/buildah-build@v2
with:
image: iib-api
tags: ${{ github.event.release.tag_name }} latest
tags: ${{ github.event.release.tag_name || steps.iibtag.outputs.tag }} latest
dockerfiles: |
./docker/Dockerfile-api
Expand All @@ -40,7 +54,7 @@ jobs:
uses: redhat-actions/buildah-build@v2
with:
image: iib-message-broker
tags: ${{ github.event.release.tag_name }} latest
tags: ${{ github.event.release.tag_name || steps.iibtag.outputs.tag }} latest
dockerfiles: |
./docker/message_broker/Dockerfile
Expand Down

0 comments on commit 7e519c3

Please sign in to comment.