2025-02-14 11:11:31 +08:00

47 lines
1.2 KiB
YAML

dev: 打包镜像 & 在开发环境启动服务
on: [push]
jobs:
build-services:
runs-on: runner
strategy:
matrix:
include:
- service: user
dockerfile: app/user/Dockerfile
image: user
- 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:
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