Skip to content

.github/workflows/release-operator.yaml #20

.github/workflows/release-operator.yaml

.github/workflows/release-operator.yaml #20

on:
push:
tags:
- 'v[0-9]+.[0-9]+.[0-9]+-?*'
jobs:
build:
name: Build
runs-on: ubuntu-latest
env:
GOPRIVATE: github.com/streamnative
IMAGE_BASE: docker.cloudsmith.io/streamnative/operators/flink-operator
steps:
- name: Set up Go 1.18
uses: actions/setup-go@v1
with:
go-version: 1.18
id: go
- name: Check out code into the Go module directory
uses: actions/checkout@v2
- name: Setup operator-sdk
run: |
wget https://github.com/operator-framework/operator-sdk/releases/download/v1.14.0/operator-sdk_linux_amd64 -O operator-sdk
chmod +x operator-sdk
mv operator-sdk /usr/local/bin/
operator-sdk version
- name: Login to CloudSmith
uses: docker/login-action@v1
with:
registry: docker.cloudsmith.io
username: ${{ secrets.CLOUDSMITH_USERNAME }}
password: ${{ secrets.CLOUDSMITH_PASSWORD }}
- name: Build
run: |
_tag_version=${GITHUB_REF##*/}
export VERSION=${_tag_version/v/}
echo $_tag_version, $VERSION
export IMG=$IMAGE_BASE:v$VERSION
export BUNDLE_IMG=$IMAGE_BASE-bundle:v$VERSION
make docker-build
make docker-push
make bundle
make bundle-build
make bundle-push