Skip to content

Build & Publish

Build & Publish #260

name: Build & Publish
on:
push:
branches:
- main
workflow_run:
workflows: ["Tests & Builds"]
branches: [main]
types: [completed]
defaults:
run:
shell: bash
jobs:
publish-operator:
name: Operator Image
runs-on: ubuntu-latest
strategy:
matrix:
go: [ '1.22' ]
if: ${{ github.event.workflow_run.conclusion == 'success' }}
steps:
- name: Checkout source
uses: actions/checkout@v3
- name: Setup go
uses: actions/setup-go@v3
with:
go-version: ${{ matrix.go }}
- name: Build
run: make operator-build
- name: Login to Quay
uses: docker/login-action@v1
with:
registry: quay.io
username: ${{ secrets.QUAY_USERNAME }}
password: ${{ secrets.QUAY_ROBOT_TOKEN }}
- name: Push
run: make operator-push
publish-bundle:
name: Bundle Image
needs: publish-operator
runs-on: ubuntu-latest
strategy:
matrix:
go: [ '1.22' ]
if: ${{ github.event.workflow_run.conclusion == 'success' }}
steps:
- name: Checkout source
uses: actions/checkout@v3
- name: Setup go
uses: actions/setup-go@v3
with:
go-version: ${{ matrix.go }}
- name: Build
run: make bundle-build
- name: Login to Quay
uses: docker/login-action@v1
with:
registry: quay.io
username: ${{ secrets.QUAY_USERNAME }}
password: ${{ secrets.QUAY_ROBOT_TOKEN }}
- name: Push
run: make bundle-push
publish-catalog:
name: Catalog Image
needs: publish-bundle
runs-on: ubuntu-latest
strategy:
matrix:
go: [ '1.22' ]
if: ${{ github.event.workflow_run.conclusion == 'success' }}
steps:
- name: Checkout source
uses: actions/checkout@v3
- name: Setup go
uses: actions/setup-go@v3
with:
go-version: ${{ matrix.go }}
- name: Build
run: make catalog-build
- name: Login to Quay
uses: docker/login-action@v1
with:
registry: quay.io
username: ${{ secrets.QUAY_USERNAME }}
password: ${{ secrets.QUAY_ROBOT_TOKEN }}
- name: Push
run: make catalog-push