Skip to content

Commit 0fb51dd

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 cb03bcf commit 0fb51dd

1 file changed

Lines changed: 8 additions & 1 deletion

File tree

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

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@ on:
44
push:
55
branches:
66
- main
7+
- lcore-migration
78
workflow_dispatch: {}
89

910
env:
@@ -32,7 +33,13 @@ jobs:
3233
BUNDLE_IMAGE=${IMAGE_TAG_BASE}-bundle:v${VERSION}
3334
CATALOG_IMAGE=${IMAGE_TAG_BASE}-catalog:v${VERSION}
3435
35-
LATEST_TAG=latest
36+
# `main` branch -> `latest` tag
37+
# any other branch -> `[branch-name]-latest` tag
38+
if [[ "${{ github.ref_name }}" == "main" ]]; then
39+
LATEST_TAG=latest
40+
else
41+
LATEST_TAG=${{ github.ref_name }}-latest
42+
fi
3643
OPERATOR_IMAGE_LATEST=${IMAGE_TAG_BASE}:${LATEST_TAG}
3744
BUNDLE_IMAGE_LATEST=${IMAGE_TAG_BASE}-bundle:${LATEST_TAG}
3845
CATALOG_IMAGE_LATEST=${IMAGE_TAG_BASE}-catalog:${LATEST_TAG}

0 commit comments

Comments
 (0)