ci: fix release workflow job #18
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: images | |
on: | |
push: | |
branches: [ v1alpha1 ] | |
tags: [ v* ] | |
jobs: | |
push-image: | |
name: Push operator container images | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout source | |
uses: actions/checkout@v3 | |
- uses: actions/setup-go@main | |
with: | |
go-version-file: go.mod | |
- name: Login to Quay | |
uses: docker/login-action@v2 | |
with: | |
registry: quay.io/sustainable_computing_io | |
username: ${{ secrets.BOT_NAME }} | |
password: ${{ secrets.BOT_TOKEN }} | |
- name: Generate Version | |
id: version | |
run: | | |
echo ${{ github.ref }} | |
echo $GITHUB_REF | |
if [[ "$GITHUB_REF" =~ refs/tags ]]; then | |
version="$(cat VERSION)" | |
else | |
version="$(cat VERSION)-$(date +%y%m%d%H%M%S)" | |
fi | |
echo VERSION=$version | |
echo "version=$version" >> $GITHUB_OUTPUT | |
- name: Build Operator | |
run: | | |
make operator-build | |
env: | |
VERSION: ${{ steps.version.outputs.version }} | |
IMG_BASE: ${{ vars.IMG_BASE }} | |
- name: Build Bundle | |
run: | | |
make bundle bundle-build | |
env: | |
VERSION: ${{ steps.version.outputs.version }} | |
IMG_BASE: ${{ vars.IMG_BASE }} | |
- name: Push Images | |
run: | | |
make operator-push bundle-push | |
env: | |
VERSION: ${{ steps.version.outputs.version }} | |
IMG_BASE: ${{ vars.IMG_BASE }} |