Skip to content

Commit 04d1157

Browse files
authored
ci: only mark finalized releases as 'latest' (#515)
1 parent 377bbb5 commit 04d1157

File tree

1 file changed

+3
-4
lines changed

1 file changed

+3
-4
lines changed

.circleci/ci-docker-tag-op-geth-release.sh

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -27,12 +27,11 @@ fi
2727
echo "Tagging $SOURCE_IMAGE_TAG with '$IMAGE_TAG'"
2828
gcloud container images add-tag -q "$SOURCE_IMAGE_TAG" "$TARGET_IMAGE_TAG"
2929

30-
# Do not tag with latest if the release is a release candidate.
31-
if [[ "$IMAGE_TAG" == *"rc"* ]]; then
32-
echo "Not tagging with 'latest' because the release is a release candidate."
30+
# Only tag finalized releases with 'latest'
31+
if ! [[ "$IMAGE_TAG" =~ ^v1\.[0-9]+\.[0-9]+$ ]]; then
32+
echo "Not tagging with 'latest' because the release is not finalized."
3333
exit 0
3434
fi
3535

3636
echo "Tagging $SOURCE_IMAGE_TAG with 'latest'"
3737
gcloud container images add-tag -q "$SOURCE_IMAGE_TAG" "$TARGET_IMAGE_TAG_LATEST"
38-

0 commit comments

Comments
 (0)