From ed99a4dcabee3ca260299b6adf5830bd600faaf1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Juan=20Jos=C3=A9=20Mata?= Date: Wed, 1 Oct 2025 19:40:20 +0200 Subject: [PATCH] Tag latest image on release (#162) * Restrict stable tag to v-prefixed releases * refactor: rewrite regex for categorizing alpha releases Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com> Signed-off-by: Himank Dave <93311724+steadyfall@users.noreply.github.com> --------- Signed-off-by: Himank Dave <93311724+steadyfall@users.noreply.github.com> Co-authored-by: Himank Dave <93311724+steadyfall@users.noreply.github.com> Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com> --- .github/workflows/publish.yml | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml index cc7427dec..a2de97093 100644 --- a/.github/workflows/publish.yml +++ b/.github/workflows/publish.yml @@ -86,9 +86,16 @@ jobs: if [[ $GITHUB_EVENT_NAME == "schedule" ]]; then BASE_CONFIG+=$'\n'"type=schedule,pattern=nightly" BASE_CONFIG+=$'\n'"type=schedule,pattern=nightly-{{date 'ddd'}}" - elif [[ "$GITHUB_REF" == refs/tags/v* ]]; then - BASE_CONFIG="type=semver,pattern={{version}}" - BASE_CONFIG+=$'\n'"type=raw,value=stable" + elif [[ "$GITHUB_REF" == refs/tags/* ]]; then + TAG_NAME="${GITHUB_REF#refs/tags/}" + if [[ "$TAG_NAME" == v* ]]; then + BASE_CONFIG="type=semver,pattern={{version}}" + if [[ "$TAG_NAME" == v*-alpha* ]]; then + BASE_CONFIG+=$'\n'"type=raw,value=latest" + else + BASE_CONFIG+=$'\n'"type=raw,value=stable" + fi + fi fi { echo 'TAGS_SPEC<