Skip to content

Commit

Permalink
Release build prod container image
Browse files Browse the repository at this point in the history
When we cut a release, build the container images with `:prod` tag.

Signed-off-by: Joe Talerico <[email protected]>
  • Loading branch information
Joe Talerico authored and jtaleric committed Jan 19, 2024
1 parent aefc44b commit 712b3a5
Showing 1 changed file with 54 additions and 0 deletions.
54 changes: 54 additions & 0 deletions .github/workflows/release-build-push.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,54 @@
name: Release Build and Push Image

on:
push:
tags:
- "*"

jobs:
build:
name: Build and push image
runs-on: ubuntu-20.04

steps:
- uses: actions/checkout@v2

- name: Build Frontend Image
id: build-front
uses: redhat-actions/buildah-build@v2
with:
image: frontend
context: frontend
tags: prod ${{ github.sha }}
containerfiles: |
./frontend/frontend.containerfile
- name: Push frontend image to quay.io
id: push-front-to-quay
uses: redhat-actions/push-to-registry@v2
with:
image: ${{ steps.build-front.outputs.image }}
tags: ${{ steps.build-front.outputs.tags }}
registry: quay.io/cloud-bulldozer
username: ${{ secrets.QUAY_USER }}
password: ${{ secrets.QUAY_TOKEN }}

- name: Build Backend Image
id: build-back
uses: redhat-actions/buildah-build@v2
with:
image: backend
context: backend
tags: prod ${{ github.sha }}
containerfiles: |
./backend/backend.containerfile
- name: Push backend image to quay.io
id: push-back-to-quay
uses: redhat-actions/push-to-registry@v2
with:
image: ${{ steps.build-back.outputs.image }}
tags: ${{ steps.build-back.outputs.tags }}
registry: quay.io/cloud-bulldozer
username: ${{ secrets.QUAY_USER }}
password: ${{ secrets.QUAY_TOKEN }}

0 comments on commit 712b3a5

Please sign in to comment.