Build & Publish #226
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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.21' ] | |
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.21' ] | |
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.21' ] | |
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 |