Skip to content

Commit 2a4731a

Browse files
sutaakaropenshift-merge-robot
authored andcommitted
Build and publish dev operator image for every commit
1 parent 30a6812 commit 2a4731a

File tree

1 file changed

+13
-28
lines changed

1 file changed

+13
-28
lines changed

.github/workflows/operator-image.yml

+13-28
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,17 @@
1-
# This workflow will build the CodeFlare Operator image and push it to the project-codeflare image registry
1+
# This workflow will build the CodeFlare Operator dev image and push it to the project-codeflare image registry
22

3-
name: Operator Image
3+
name: Operator Dev Image
44

55
on:
6-
workflow_dispatch:
7-
inputs:
8-
tag:
9-
description: 'Tag to be used for operator image'
10-
required: true
11-
default: 'unstable'
6+
push:
7+
branches:
8+
- main
9+
paths-ignore:
10+
- 'docs/**'
11+
- 'test/**'
12+
- '**.adoc'
13+
- '**.md'
14+
- 'LICENSE'
1215

1316
jobs:
1417
push:
@@ -21,14 +24,6 @@ jobs:
2124
with:
2225
go-version: v1.19
2326

24-
- name: Install operator-sdk
25-
run: |
26-
export ARCH=$(case $(uname -m) in x86_64) echo -n amd64 ;; aarch64) echo -n arm64 ;; *) echo -n $(uname -m) ;; esac)
27-
export OS=$(uname | awk '{print tolower($0)}')
28-
export OPERATOR_SDK_DL_URL=https://github.com/operator-framework/operator-sdk/releases/download/v1.27.0
29-
curl -LO ${OPERATOR_SDK_DL_URL}/operator-sdk_${OS}_${ARCH}
30-
chmod +x operator-sdk_${OS}_${ARCH} && sudo mv operator-sdk_${OS}_${ARCH} /usr/local/bin/operator-sdk
31-
3227
- name: Login to Quay.io
3328
uses: redhat-actions/podman-login@v1
3429
with:
@@ -39,15 +34,5 @@ jobs:
3934
- name: Image Build
4035
run: |
4136
make build
42-
make bundle
43-
make image-build -e IMG=quay.io/project-codeflare/codeflare-operator:${SOURCE_TAG}
44-
podman tag quay.io/project-codeflare/codeflare-operator:${SOURCE_TAG} quay.io/project-codeflare/codeflare-operator:latest
45-
env:
46-
SOURCE_TAG: ${{ github.event.inputs.tag }}
47-
48-
- name: Image Push
49-
run: |
50-
make image-push -e IMG=quay.io/project-codeflare/codeflare-operator:${SOURCE_TAG}
51-
make image-push -e IMG=quay.io/project-codeflare/codeflare-operator:latest
52-
env:
53-
SOURCE_TAG: ${{ github.event.inputs.tag }}
37+
make image-build -e IMG=quay.io/project-codeflare/codeflare-operator:dev
38+
make image-push -e IMG=quay.io/project-codeflare/codeflare-operator:dev

0 commit comments

Comments
 (0)