Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Apply latest tag only when image tag matches a semantic version
  • Loading branch information
sukantoraymond authored and maru-ava committed Dec 19, 2025
commit 8afc1166e30ceedf0fe191ea27f1a38ed63ac5a2
4 changes: 2 additions & 2 deletions scripts/build_image.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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" ]]; then
# Tag latest when pushing to a registry and the tag is a release (vMAJOR.MINOR.PATCH)
if [[ "${DOCKER_IMAGE}" == *"/"* && $image_tag =~ ^v[0-9]+\.[0-9]+\.[0-9]+$ ]]; then
echo "Tagging current avalanchego images as $DOCKER_IMAGE:latest"
docker buildx imagetools create -t "$DOCKER_IMAGE:latest" "$DOCKER_IMAGE:$commit_hash"
fi
Expand Down