Skip to content

Build and publish dev operator image for every commit #228

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Aug 11, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
41 changes: 13 additions & 28 deletions .github/workflows/operator-image.yml
Original file line number Diff line number Diff line change
@@ -1,14 +1,17 @@
# This workflow will build the CodeFlare Operator image and push it to the project-codeflare image registry
# This workflow will build the CodeFlare Operator dev image and push it to the project-codeflare image registry

name: Operator Image
name: Operator Dev Image

on:
workflow_dispatch:
inputs:
tag:
description: 'Tag to be used for operator image'
required: true
default: 'unstable'
push:
branches:
- main
paths-ignore:
- 'docs/**'
- 'test/**'
- '**.adoc'
- '**.md'
- 'LICENSE'

jobs:
push:
Expand All @@ -21,14 +24,6 @@ jobs:
with:
go-version: v1.19

- name: Install operator-sdk
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Great. Was meaning to remove this as well.

run: |
export ARCH=$(case $(uname -m) in x86_64) echo -n amd64 ;; aarch64) echo -n arm64 ;; *) echo -n $(uname -m) ;; esac)
export OS=$(uname | awk '{print tolower($0)}')
export OPERATOR_SDK_DL_URL=https://github.com/operator-framework/operator-sdk/releases/download/v1.27.0
curl -LO ${OPERATOR_SDK_DL_URL}/operator-sdk_${OS}_${ARCH}
chmod +x operator-sdk_${OS}_${ARCH} && sudo mv operator-sdk_${OS}_${ARCH} /usr/local/bin/operator-sdk

- name: Login to Quay.io
uses: redhat-actions/podman-login@v1
with:
Expand All @@ -39,15 +34,5 @@ jobs:
- name: Image Build
run: |
make build
make bundle
make image-build -e IMG=quay.io/project-codeflare/codeflare-operator:${SOURCE_TAG}
podman tag quay.io/project-codeflare/codeflare-operator:${SOURCE_TAG} quay.io/project-codeflare/codeflare-operator:latest
env:
SOURCE_TAG: ${{ github.event.inputs.tag }}

- name: Image Push
run: |
make image-push -e IMG=quay.io/project-codeflare/codeflare-operator:${SOURCE_TAG}
make image-push -e IMG=quay.io/project-codeflare/codeflare-operator:latest
env:
SOURCE_TAG: ${{ github.event.inputs.tag }}
make image-build -e IMG=quay.io/project-codeflare/codeflare-operator:dev
make image-push -e IMG=quay.io/project-codeflare/codeflare-operator:dev