Skip to content

Merge pull request #812 from openshift-kni/pkg-deprecate-k8sclient #9

Merge pull request #812 from openshift-kni/pkg-deprecate-k8sclient

Merge pull request #812 from openshift-kni/pkg-deprecate-k8sclient #9

name: CI operator release flow
on:
push:
# Sequence of patterns matched against refs/tags
tags:
- "v[0-9]+.[0-9]+.[0-9]+"
- "v[0-9]+.[0-9]+.[0-9]+-dev[0-9]+"
- "v[0-9]+.[0-9]+.[0-9]+-pre[0-9]+"
- "v[0-9]+.[0-9]+.[0-9]+-rc[0-9]+"
# Allows you to run this workflow manually from the Actions tab
workflow_dispatch:
defaults:
run:
shell: bash
jobs:
release-build:
runs-on: ubuntu-20.04
steps:
- name: Checkout sources
uses: actions/checkout@v3
with:
fetch-depth: 0
- name: Setup golang
uses: actions/setup-go@v3
id: go
with:
go-version: 1.20.6
- name: Set release version env var
run: |
echo "RELEASE_VERSION=${GITHUB_REF#refs/*/}" >> $GITHUB_ENV
- name: Build Image
id: build-image
uses: redhat-actions/buildah-build@v2
with:
image: numaresources-operator
tags: ${{ env.RELEASE_VERSION}}
dockerfiles: |
./Dockerfile
- name: Push to quay
id: push-to-quay
uses: redhat-actions/push-to-registry@v2
with:
image: ${{ steps.build-image.outputs.image }}
tags: ${{ steps.build-image.outputs.tags }}
registry: quay.io/openshift-kni
username: ${{ secrets.QUAY_IO_USERNAME }}
password: ${{ secrets.QUAY_IO_ROBOTOKEN }}
- name: Print image url
run: echo "Image pushed to ${{ steps.push-to-quay.outputs.registry-paths }}"
- name: Build Image
id: build-image-bundle
uses: redhat-actions/buildah-build@v2
with:
image: numaresources-operator-bundle
tags: ${{ env.RELEASE_VERSION}}
dockerfiles: |
./Dockerfile.bundle
- name: Push to quay
id: bundle-push-to-quay
uses: redhat-actions/push-to-registry@v2
with:
image: ${{ steps.build-image-bundle.outputs.image }}
tags: ${{ steps.build-image-bundle.outputs.tags }}
registry: quay.io/openshift-kni
username: ${{ secrets.QUAY_IO_USERNAME }}
password: ${{ secrets.QUAY_IO_ROBOTOKEN }}
- name: Print image url
run: echo "Bundle image pushed to ${{ steps.bundle-push-to-quay.outputs.registry-paths }}"