From 6091a74e387a410ff408fdbc19b83195b7011082 Mon Sep 17 00:00:00 2001 From: phattt2901 Date: Tue, 6 May 2025 00:56:00 +0700 Subject: [PATCH] Test CI v2.1.50 --- .gitea/workflows/ci.yml | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/.gitea/workflows/ci.yml b/.gitea/workflows/ci.yml index 7a1d663..704bd0a 100644 --- a/.gitea/workflows/ci.yml +++ b/.gitea/workflows/ci.yml @@ -6,9 +6,7 @@ name: Go CI Pipeline on: push: tags: - - 'v*.*.*' - branches: [ master ] # Hoặc main - + - 'v*' jobs: # ---- Job: Lint Code ---- lint: @@ -119,6 +117,8 @@ jobs: docker-build-push: name: Build and Push Docker Image runs-on: ubuntu-latest + env: + REGISTRY: gitea.tuvanwebsite.com # Chạy sau khi job 'build' (tạo binary) thành công needs: [build] # Chỉ chạy khi push vào nhánh master (không chạy cho PR) @@ -157,8 +157,8 @@ jobs: file: ./Dockerfile.prod # Chỉ định Dockerfile cho production push: true # Đẩy image lên registry tags: | # Đặt tên và tag cho image - ${{ gitea.server_url }}/${{ gitea.repository }}:${{ gitea.ref_name }} - ${{ gitea.server_url }}/${{ gitea.repository }}:latest + ${{ secrets.REGISTRY_URL }}/${{ gitea.repository }}:${{ gitea.ref_name }} + ${{ secrets.REGISTRY_URL }}/${{ gitea.repository }}:latest # cache-from: type=gha # Bật cache build layer (tùy chọn) # cache-to: type=gha,mode=max # ---- Job: Deploy to VPS ----