Merge pull request #193 from vbnrh/bz-2267885 #187
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.19' ] | |
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 docker-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 docker-push | |
publish-bundle: | |
name: Bundle Image | |
needs: publish-operator | |
runs-on: ubuntu-latest | |
strategy: | |
matrix: | |
go: [ '1.19' ] | |
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.19' ] | |
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 |