diff --git a/.gcp/release-docker.yml b/.gcp/release-docker.yml index f413da5b..53e78b08 100644 --- a/.gcp/release-docker.yml +++ b/.gcp/release-docker.yml @@ -26,15 +26,11 @@ steps: - |- SHELL_TAG_NAME="$TAG_NAME" FINAL_TAG="$SHORT_SHA" # Default to SHA - if [[ "$$SHELL_TAG_NAME" == *"-nightly"* ]]; then - echo "Nightly release detected." - FINAL_TAG="$${SHELL_TAG_NAME#v}" - # Also escape the variable in the regex match - elif [[ "$$SHELL_TAG_NAME" =~ ^v[0-9]+\.[0-9]+\.[0-9]+$ ]]; then - echo "Official release detected." + if [[ "$$SHELL_TAG_NAME" =~ ^v[0-9]+\.[0-9]+\.[0-9]+(-[a-zA-Z0-9.-]+)?$ ]]; then + echo "Release detected." FINAL_TAG="$${SHELL_TAG_NAME#v}" else - echo "Development/RC release detected. Using commit SHA as tag." + echo "Development release detected. Using commit SHA as tag." fi echo "Determined image tag: $$FINAL_TAG" echo "$$FINAL_TAG" > /workspace/image_tag.txt