From f095f56e20e5c4dd996dd40efc5c9980eba55c34 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=AE=89=E6=AD=A3=E8=B6=85?= Date: Wed, 18 Mar 2026 21:05:52 +0800 Subject: [PATCH] fix(ci): revert docker alpha latest tag (#2209) --- .github/workflows/docker.yml | 24 ++++++++++++++++++++---- 1 file changed, 20 insertions(+), 4 deletions(-) diff --git a/.github/workflows/docker.yml b/.github/workflows/docker.yml index c4d8f3816..c4e2c100f 100644 --- a/.github/workflows/docker.yml +++ b/.github/workflows/docker.yml @@ -163,7 +163,14 @@ jobs: if [[ "$version" == *"alpha"* ]] || [[ "$version" == *"beta"* ]] || [[ "$version" == *"rc"* ]]; then build_type="prerelease" is_prerelease=true - echo "🧪 Building Docker image for prerelease: $version" + # TODO: Temporary change - currently allows alpha versions to also create latest tags + # After the version is stable, you need to remove the following line and restore the original logic (latest is created only for stable versions) + if [[ "$version" == *"alpha"* ]]; then + create_latest=true + echo "🧪 Building Docker image for prerelease: $version (temporarily allowing creation of latest tag)" + else + echo "🧪 Building Docker image for prerelease: $version" + fi else build_type="release" create_latest=true @@ -209,7 +216,14 @@ jobs: v*alpha*|v*beta*|v*rc*|*alpha*|*beta*|*rc*) build_type="prerelease" is_prerelease=true - echo "🧪 Building with prerelease version: $input_version" + # TODO: Temporary change - currently allows alpha versions to also create latest tags + # After the version is stable, you need to remove the if block below and restore the original logic. + if [[ "$input_version" == *"alpha"* ]]; then + create_latest=true + echo "🧪 Building with prerelease version: $input_version (temporarily allowing creation of latest tag)" + else + echo "🧪 Building with prerelease version: $input_version" + fi ;; # Release versions (match after prereleases, more general) v[0-9]*|[0-9]*.*.*) @@ -436,8 +450,10 @@ jobs: "prerelease") echo "🧪 Prerelease Docker image has been built with ${VERSION} tags" echo "⚠️ This is a prerelease image - use with caution" - if [[ "$CREATE_LATEST" == "true" ]]; then - echo "🏷️ Latest tag has been explicitly created for prerelease" + # TODO: Temporary change - alpha versions currently create the latest tag + # After the version is stable, you need to restore the following prompt information + if [[ "$VERSION" == *"alpha"* ]] && [[ "$CREATE_LATEST" == "true" ]]; then + echo "🏷️ Latest tag has been created for alpha version (temporary measures)" else echo "🚫 Latest tag NOT created for prerelease" fi