1
Some checks failed
Auth & User Management Service CI / ranking_management (push) Failing after 30s
Auth & User Management Service CI / douyin_ecpm_calculation_service (push) Failing after 30s
Auth & User Management Service CI / auth_service (push) Failing after 10s
Auth & User Management Service CI / user (push) Failing after 30s

This commit is contained in:
xiabin 2025-02-11 14:06:30 +08:00
parent 88ca5a1710
commit 33932f07f6
4 changed files with 137 additions and 4 deletions

View File

@ -3,7 +3,7 @@ name: Auth & User Management Service CI
on: [push] on: [push]
jobs: jobs:
Explore-Gitea-Actions: user:
runs-on: runner runs-on: runner
steps: steps:
@ -11,9 +11,44 @@ jobs:
- uses: actions/setup-go@v5 - uses: actions/setup-go@v5
with: with:
go-version: '1.23.6' go-version: '1.23.6'
- name: Check Go version - name: Check Go version
run: go version # 正确查看版本 run: go version # 正确查看版本
- name: Build - name: Build
run: 'docker build -t user_manager -f app/user_management/Dockerfile .' run: 'docker build -t user_manager -f app/user_management/Dockerfile .'
ranking_management:
runs-on: runner
steps:
- uses: actions/checkout@v4
- uses: actions/setup-go@v5
with:
go-version: '1.23.6'
- name: Check Go version
run: go version # 查看版本
- name: Build
run: 'docker build -t ranking_management -f app/ranking_management/Dockerfile .'
douyin_ecpm_calculation_service:
runs-on: runner
steps:
- uses: actions/checkout@v4
- uses: actions/setup-go@v5
with:
go-version: '1.23.6'
- name: Check Go version
run: go version # 查看版本
- name: Build
run: 'docker build -t douyin_ecpm_calculation_service -f app/douyin_ecpm_calculation_service/Dockerfile .'
auth_service:
runs-on: runner
steps:
- uses: actions/checkout@v4
- uses: actions/setup-go@v5
with:
go-version: '1.23.6'
- name: Check Go version
run: go version # 查看版本
- name: Build
run: 'docker build -t auth_service -f app/auth_service/Dockerfile .'

View File

@ -0,0 +1,32 @@
FROM golang:alpine AS builder
LABEL stage=gobuilder
ENV CGO_ENABLED=0
ENV GOPROXY=https://goproxy.cn,direct
RUN sed -i 's/dl-cdn.alpinelinux.org/mirrors.aliyun.com/g' /etc/apk/repositories
RUN apk update --no-cache && apk add --no-cache tzdata
RUN apk add --no-cache git
WORKDIR /build
ADD go.mod .
ADD go.sum .
RUN go env -w GOPRIVATE=gitea.youtukeji.com.cn
RUN go mod download
COPY . .
RUN go build -ldflags="-s -w" -o /app/auth_service ./app/auth_service/auth_service.go
FROM alpine
COPY --from=builder /usr/share/zoneinfo/Asia/Shanghai /usr/share/zoneinfo/Asia/Shanghai
ENV TZ=Asia/Shanghai
WORKDIR /app
COPY --from=builder /app/auth_service /app/server
EXPOSE 8888
CMD ["/app/server"]

View File

@ -0,0 +1,33 @@
FROM golang:alpine AS builder
LABEL stage=gobuilder
ENV CGO_ENABLED=0
ENV GOPROXY=https://goproxy.cn,direct
RUN sed -i 's/dl-cdn.alpinelinux.org/mirrors.aliyun.com/g' /etc/apk/repositories
RUN apk update --no-cache && apk add --no-cache tzdata
RUN apk add --no-cache git
WORKDIR /build
ADD go.mod .
ADD go.sum .
RUN go env -w GOPRIVATE=gitea.youtukeji.com.cn
RUN go mod download
COPY . .
RUN go build -ldflags="-s -w" -o /app/douyin_ecpm_calculation_service ./app/douyin_ecpm_calculation_service/douyin_ecpm_calculation_service.go
FROM alpine
COPY --from=builder /usr/share/zoneinfo/Asia/Shanghai /usr/share/zoneinfo/Asia/Shanghai
ENV TZ=Asia/Shanghai
WORKDIR /app
COPY --from=builder /app/douyin_ecpm_calculation_service /app/server
EXPOSE 8888
CMD ["/app/server"]

View File

@ -0,0 +1,33 @@
FROM golang:alpine AS builder
LABEL stage=gobuilder
ENV CGO_ENABLED=0
ENV GOPROXY=https://goproxy.cn,direct
RUN sed -i 's/dl-cdn.alpinelinux.org/mirrors.aliyun.com/g' /etc/apk/repositories
RUN apk update --no-cache && apk add --no-cache tzdata
RUN apk add --no-cache git
WORKDIR /build
ADD go.mod .
ADD go.sum .
RUN go env -w GOPRIVATE=gitea.youtukeji.com.cn
RUN go mod download
COPY . .
RUN go build -ldflags="-s -w" -o /app/ranking_management ./app/ranking_management/ranking_management.go
FROM alpine
COPY --from=builder /usr/share/zoneinfo/Asia/Shanghai /usr/share/zoneinfo/Asia/Shanghai
ENV TZ=Asia/Shanghai
WORKDIR /app
COPY --from=builder /app/ranking_management /app/server
EXPOSE 8888
CMD ["/app/server"]