From 97348f2ecd759ad3e13beb84ce113347220368d7 Mon Sep 17 00:00:00 2001 From: waruneeauy Date: Mon, 20 Apr 2026 21:15:06 +0700 Subject: [PATCH] fix build version --- .forgejo/workflows/ci-cd.yml | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/.forgejo/workflows/ci-cd.yml b/.forgejo/workflows/ci-cd.yml index a69a8554..0463a093 100644 --- a/.forgejo/workflows/ci-cd.yml +++ b/.forgejo/workflows/ci-cd.yml @@ -4,8 +4,8 @@ name: Build & Deploy on Dev on: push: tags: - - "v[0-9]+.[0-9]+.[0-9]+" - - "v[0-9]+.[0-9]+.[0-9]+*" + - 'v[0-9]+.[0-9]+.[0-9]+' + # - 'version-[0-9]+.[0-9]+.[0-9]+' workflow_dispatch: env: @@ -30,7 +30,11 @@ jobs: ca=["/etc/ssl/certs/ca-certificates.crt"] - name: Tag Version run: | - echo "IMAGE_VERSION=latest" + if [ "${{ github.ref_type }}" == "tag" ]; then + echo "IMAGE_VERSION=${{ github.ref_name }}" >> $GITHUB_ENV + else + echo "IMAGE_VERSION=latest" >> $GITHUB_ENV + fi - name: Login in to registry uses: docker/login-action@v2 with: @@ -54,7 +58,7 @@ jobs: password: ${{ secrets.SSH_DEPLOY_PASSWORD }} script: | cd ~/repo - ./replace-env.sh APP_ADMIN "${{ env.IMAGE_VERSION }}" + ./replace-env.sh APP_CHECKIN "${{ env.IMAGE_VERSION }}" ./deploy.sh hrms-admin - name: Discord Notification