47 lines
1.2 KiB
YAML
Raw Normal View History

2025-02-14 10:30:15 +08:00
dev: 打包镜像 & 在开发环境启动服务
on: [push]
jobs:
build-services:
runs-on: runner
strategy:
matrix:
include:
2025-02-14 10:30:15 +08:00
- service: user
2025-02-14 17:48:16 +08:00
dockerfile: app/user_service/Dockerfile
2025-02-14 11:04:25 +08:00
image: user
2025-02-14 10:30:15 +08:00
- service: ranking
2025-02-14 17:48:16 +08:00
dockerfile: app/ranking_service/Dockerfile
2025-02-14 10:30:15 +08:00
image: ranking
- service: ecpm
2025-02-14 17:48:16 +08:00
dockerfile: app/ecpm_service/Dockerfile
2025-02-14 10:30:15 +08:00
image: ecpm
- service: auth
2025-02-14 17:48:16 +08:00
dockerfile: app/auth_service/Dockerfile
2025-02-14 10:30:15 +08:00
image: auth
steps:
- uses: https://gitea.youtukeji.com.cn/actions/checkout@v4
- uses: https://gitea.youtukeji.com.cn/actions/setup-go@v5
with:
2025-02-14 10:34:01 +08:00
go-version: '1.24.0'
- 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