From 91021c09504adb96ec818289aa2337334b3d9a4a Mon Sep 17 00:00:00 2001 From: Raymond Sukanto Date: Wed, 5 Nov 2025 16:51:12 -0500 Subject: [PATCH 1/4] mark release as docker latest --- scripts/build_image.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/scripts/build_image.sh b/scripts/build_image.sh index d96547abc58d..81a95c9f2e93 100755 --- a/scripts/build_image.sh +++ b/scripts/build_image.sh @@ -116,8 +116,8 @@ if [[ -z "${SKIP_BUILD_RACE}" ]]; then "$AVALANCHE_PATH" -f "$AVALANCHE_PATH/Dockerfile" fi -# Only tag the latest image for the master branch when images are pushed to a registry -if [[ "${DOCKER_IMAGE}" == *"/"* && ($image_tag == "master" || -n "${FORCE_TAG_LATEST}") ]]; then +# Tag latest when pushing to a registry and the tag is a release (vMAJOR.MINOR.PATCH), or when forced +if [[ "${DOCKER_IMAGE}" == *"/"* && ( $image_tag =~ ^v[0-9]+\.[0-9]+\.[0-9]+$ || -n "${FORCE_TAG_LATEST}" ) ]]; then echo "Tagging current avalanchego images as $DOCKER_IMAGE:latest" docker buildx imagetools create -t "$DOCKER_IMAGE:latest" "$DOCKER_IMAGE:$commit_hash" fi From 069d0aa9b4791547bc465bc704b5f180a8cea2e8 Mon Sep 17 00:00:00 2001 From: Raymond Sukanto Date: Wed, 5 Nov 2025 16:57:57 -0500 Subject: [PATCH 2/4] lint --- scripts/build_image.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/build_image.sh b/scripts/build_image.sh index 81a95c9f2e93..b8c603829a7d 100755 --- a/scripts/build_image.sh +++ b/scripts/build_image.sh @@ -117,7 +117,7 @@ if [[ -z "${SKIP_BUILD_RACE}" ]]; then fi # Tag latest when pushing to a registry and the tag is a release (vMAJOR.MINOR.PATCH), or when forced -if [[ "${DOCKER_IMAGE}" == *"/"* && ( $image_tag =~ ^v[0-9]+\.[0-9]+\.[0-9]+$ || -n "${FORCE_TAG_LATEST}" ) ]]; then +if [[ "${DOCKER_IMAGE}" == *"/"* && ( "$image_tag" =~ ^v[0-9]+\.[0-9]+\.[0-9]+$ || -n "${FORCE_TAG_LATEST}" ) ]]; then echo "Tagging current avalanchego images as $DOCKER_IMAGE:latest" docker buildx imagetools create -t "$DOCKER_IMAGE:latest" "$DOCKER_IMAGE:$commit_hash" fi From d3e3f3f3ba2c76ceb7dc655443dd213156a0a0fb Mon Sep 17 00:00:00 2001 From: Raymond Sukanto Date: Fri, 7 Nov 2025 12:46:49 -0500 Subject: [PATCH 3/4] lint --- scripts/build_image.sh | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/scripts/build_image.sh b/scripts/build_image.sh index b8c603829a7d..2e2df088a88c 100755 --- a/scripts/build_image.sh +++ b/scripts/build_image.sh @@ -121,3 +121,9 @@ if [[ "${DOCKER_IMAGE}" == *"/"* && ( "$image_tag" =~ ^v[0-9]+\.[0-9]+\.[0-9]+$ echo "Tagging current avalanchego images as $DOCKER_IMAGE:latest" docker buildx imagetools create -t "$DOCKER_IMAGE:latest" "$DOCKER_IMAGE:$commit_hash" fi + +# Also tag master builds as latest-unstable when images are pushed to a registry +if [[ "${DOCKER_IMAGE}" == *"/"* && "$image_tag" == "master" ]]; then + echo "Tagging current avalanchego images as $DOCKER_IMAGE:latest-unstable" + docker buildx imagetools create -t "$DOCKER_IMAGE:latest-unstable" "$DOCKER_IMAGE:$commit_hash" +fi From cc5657faf8d84ad60fd8a551728efdd9c60ab58b Mon Sep 17 00:00:00 2001 From: Raymond Sukanto Date: Fri, 14 Nov 2025 11:59:48 -0500 Subject: [PATCH 4/4] address comments --- scripts/build_image.sh | 6 ------ 1 file changed, 6 deletions(-) diff --git a/scripts/build_image.sh b/scripts/build_image.sh index 2e2df088a88c..b8c603829a7d 100755 --- a/scripts/build_image.sh +++ b/scripts/build_image.sh @@ -121,9 +121,3 @@ if [[ "${DOCKER_IMAGE}" == *"/"* && ( "$image_tag" =~ ^v[0-9]+\.[0-9]+\.[0-9]+$ echo "Tagging current avalanchego images as $DOCKER_IMAGE:latest" docker buildx imagetools create -t "$DOCKER_IMAGE:latest" "$DOCKER_IMAGE:$commit_hash" fi - -# Also tag master builds as latest-unstable when images are pushed to a registry -if [[ "${DOCKER_IMAGE}" == *"/"* && "$image_tag" == "master" ]]; then - echo "Tagging current avalanchego images as $DOCKER_IMAGE:latest-unstable" - docker buildx imagetools create -t "$DOCKER_IMAGE:latest-unstable" "$DOCKER_IMAGE:$commit_hash" -fi