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