Test CI v2.1.50
Some checks failed
DNS & Network Test / network-test (push) Failing after 5s
Go CI Pipeline / Lint Code (push) Successful in 2m2s
Go CI Pipeline / Run Tests (push) Successful in 2m6s
Go CI Pipeline / Build Application (push) Successful in 2m12s
Go CI Pipeline / Security Scan (SCA - govulncheck) (push) Successful in 3m24s
Go CI Pipeline / Build and Push Docker Image (push) Has been skipped
Go CI Pipeline / Deploy to VPS (push) Has been skipped

This commit is contained in:
phattt2901 2025-05-06 00:56:00 +07:00
parent 8146b5329a
commit 6091a74e38

View File

@ -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 ----