47 lines
1.4 KiB
YAML
47 lines
1.4 KiB
YAML
|
name: Auth & User Management Service CI
|
||
|
|
||
|
on: [push]
|
||
|
|
||
|
jobs:
|
||
|
build-services:
|
||
|
runs-on: runner
|
||
|
strategy:
|
||
|
matrix:
|
||
|
include:
|
||
|
- service: user_management
|
||
|
dockerfile: app/user_management/Dockerfile
|
||
|
image: user_manager
|
||
|
- service: ranking_management
|
||
|
dockerfile: app/ranking_management/Dockerfile
|
||
|
image: ranking_management
|
||
|
- service: douyin_ecpm_calculation_service
|
||
|
dockerfile: app/douyin_ecpm_calculation_service/Dockerfile
|
||
|
image: douyin_ecpm_calculation_service
|
||
|
- service: auth_service
|
||
|
dockerfile: app/auth_service/Dockerfile
|
||
|
image: auth_service
|
||
|
steps:
|
||
|
- uses: https://gitea.youtukeji.com.cn/actions/checkout@v4
|
||
|
|
||
|
- uses: https://gitea.youtukeji.com.cn/actions/setup-go@v5
|
||
|
with:
|
||
|
go-version: '1.23.6'
|
||
|
|
||
|
- name: Verify Go version
|
||
|
run: go version
|
||
|
|
||
|
- name: Build Docker Image
|
||
|
run: docker build -t ${{ matrix.image }} -f ${{ matrix.dockerfile }} .
|
||
|
|
||
|
start-services:
|
||
|
runs-on: runner
|
||
|
needs: build-services # 依赖构建阶段
|
||
|
steps:
|
||
|
- uses: https://gitea.youtukeji.com.cn/actions/checkout@v4
|
||
|
|
||
|
- name: Start Docker Compose
|
||
|
run: |
|
||
|
docker-compose down --remove-orphans
|
||
|
docker-compose up -d --build
|
||
|
env:
|
||
|
COMPOSE_PROJECT_NAME: youtu_grpc
|