ci: refactor workflows for SonarQube, tag-only Docker builds, and global testing
SonarQube Scan / SonarQube Trigger (push) Successful in 4m14s
Docker Build and Push / Build and Push Docker Image (push) Has been cancelled
Docker Build and Push / Run Tests (push) Has been cancelled

- Run SonarQube scans only on main, staging, and feat/* branches
- Build and push Docker images only on semantic version tags
- Add test job that runs on all events
This commit is contained in:
2026-01-28 00:54:47 +07:00
parent 22ad935299
commit 07053610b5
3 changed files with 87 additions and 84 deletions
+6 -4
View File
@@ -1,7 +1,9 @@
on:
push:
pull_request:
types: [opened, synchronize, reopened]
branches:
- main
- staging
- 'feat/**'
name: SonarQube Scan
jobs:
@@ -17,7 +19,7 @@ jobs:
- name: Set up Go
uses: actions/setup-go@v6
with:
go-version: '1.25.6'
go-version: 'stable'
cache: false
- name: Install dependencies
@@ -28,7 +30,7 @@ jobs:
- name: Run tests with coverage
run: |
go test ./... -v -coverprofile=coverage
go test ./... -v -p 4 -coverprofile=coverage
- name: Run GolangCI-Lint Analysis
uses: golangci/golangci-lint-action@v9