From 53f01acb0cf1ec65f41c303c2f0e59f668f65ca0 Mon Sep 17 00:00:00 2001 From: opencode Date: Sun, 2 Aug 2026 15:25:15 +0200 Subject: [PATCH] ci: deploy release tags by v*-tag (dev stays sha-based) --- .gitea/workflows/build.yaml | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/.gitea/workflows/build.yaml b/.gitea/workflows/build.yaml index 76850f6..a180111 100644 --- a/.gitea/workflows/build.yaml +++ b/.gitea/workflows/build.yaml @@ -52,12 +52,17 @@ jobs: GITEA_TOKEN: ${{ secrets.REGISTRY_TOKEN }} run: | SHA=$(git rev-parse --short HEAD) + if [ "${{ gitea.ref_type }}" = "tag" ]; then + NEWTAG="${{ gitea.ref_name }}" + else + NEWTAG="sha-${SHA}" + fi git clone "https://admin:${GITEA_TOKEN}@git.kubebase.de/admin/apps.git" /tmp/apps cd /tmp/apps cd apps/system/toolrate/overlays/k3s - sed -i "s|newTag: .*|newTag: sha-${SHA}|" kustomization.yaml + sed -i "s|newTag: .*|newTag: ${NEWTAG}|" kustomization.yaml git config user.name "Gitea Actions" git config user.email "actions@git.kubebase.de" git add -A - git diff --cached --quiet || git commit -m "chore: update toolrate image to sha-${SHA}" + git diff --cached --quiet || git commit -m "chore: update toolrate image to ${NEWTAG}" git push