Skip to content

Commit 55af9d2

Browse files
committed
Update build-and-push workflow
Ensure that the build of the operator on the lcore-migration branch is pushed to quay.io with distinctive tag so taht we can differentiate between builds from lcore-migration and those from main.
1 parent 9d60674 commit 55af9d2

1 file changed

Lines changed: 8 additions & 2 deletions

File tree

.github/workflows/build-and-push.yaml

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ name: "Build and push operator container image"
33
on:
44
push:
55
branches:
6-
- main
6+
- lcore-migration
77
workflow_dispatch: {}
88

99
env:
@@ -32,7 +32,13 @@ jobs:
3232
BUNDLE_IMAGE=${IMAGE_TAG_BASE}-bundle:v${VERSION}
3333
CATALOG_IMAGE=${IMAGE_TAG_BASE}-catalog:v${VERSION}
3434
35-
LATEST_TAG=latest
35+
# `main` branch -> `latest` tag
36+
# any other branch -> `[branch-name]-latest` tag
37+
if [[ "${{ github.ref_name }}" == "main" ]]; then
38+
LATEST_TAG=latest
39+
else
40+
LATEST_TAG=${{ github.ref_name }}-latest
41+
fi
3642
OPERATOR_IMAGE_LATEST=${IMAGE_TAG_BASE}:${LATEST_TAG}
3743
BUNDLE_IMAGE_LATEST=${IMAGE_TAG_BASE}-bundle:${LATEST_TAG}
3844
CATALOG_IMAGE_LATEST=${IMAGE_TAG_BASE}-catalog:${LATEST_TAG}

0 commit comments

Comments
 (0)