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
dockerfile: app/user/Dockerfile
2025-02-14 11:04:25 +08:00
image: user
2025-02-14 10:30:15 +08:00
- service: ranking
dockerfile: app/ranking/Dockerfile
image: ranking
- service: ecpm
dockerfile: app/ecpm/Dockerfile
image: ecpm
- service: auth
dockerfile: app/auth/Dockerfile
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