Skip to content

Commit f600867

Browse files
committed
chore(ci): update build workflow images
1 parent cd849c5 commit f600867

File tree

2 files changed

+11
-32
lines changed

2 files changed

+11
-32
lines changed

.github/workflows/build.yml

Lines changed: 4 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -29,31 +29,19 @@ jobs:
2929
uses: docker/metadata-action@v5
3030
with:
3131
images: |
32-
ghcr.io/${{ github.repository }}/mail-service
33-
ghcr.io/${{ github.repository }}/user-service
32+
ghcr.io/${{ github.repository }}/owl-api
3433
ghcr.io/${{ github.repository }}/lark-ui
35-
ghcr.io/${{ github.repository }}/gateway
3634
tags: |
3735
type=ref,event=branch
3836
type=sha,prefix={{branch}}-
3937
type=raw,value=latest,enable={{is_default_branch}}
4038
41-
- name: Build and push owl-api mail-service
39+
- name: Build and push owl-api
4240
uses: docker/build-push-action@v5
4341
with:
4442
context: .
45-
file: ./owl-api/mail-service/Dockerfile
46-
tags: ghcr.io/${{ github.repository }}/mail-service:latest,ghcr.io/${{ github.repository }}/mail-service:${{ github.sha }}
47-
push: true
48-
cache-from: type=gha
49-
cache-to: type=gha,mode=max
50-
51-
- name: Build and push owl-api user-service
52-
uses: docker/build-push-action@v5
53-
with:
54-
context: .
55-
file: ./owl-api/user-service/Dockerfile
56-
tags: ghcr.io/${{ github.repository }}/user-service:latest,ghcr.io/${{ github.repository }}/user-service:${{ github.sha }}
43+
file: ./owl-api/Dockerfile
44+
tags: ghcr.io/${{ github.repository }}/owl-api:latest,ghcr.io/${{ github.repository }}/owl-api:${{ github.sha }}
5745
push: true
5846
cache-from: type=gha
5947
cache-to: type=gha,mode=max
@@ -68,12 +56,3 @@ jobs:
6856
cache-from: type=gha
6957
cache-to: type=gha,mode=max
7058

71-
- name: Build and push gateway
72-
uses: docker/build-push-action@v5
73-
with:
74-
context: .
75-
file: ./gateway/Dockerfile
76-
tags: ghcr.io/${{ github.repository }}/gateway:latest,ghcr.io/${{ github.repository }}/gateway:${{ github.sha }}
77-
push: true
78-
cache-from: type=gha
79-
cache-to: type=gha,mode=max

owl-api/Dockerfile

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -3,18 +3,18 @@ RUN npm install -g pnpm
33

44
FROM base AS builder
55
WORKDIR /app
6-
COPY owl-api/unified-service/package.json ./
6+
COPY owl-api/package.json ./
77
RUN pnpm install
8-
COPY owl-api/unified-service/prisma ./prisma
8+
COPY owl-api/prisma ./prisma
99
RUN npx prisma generate --schema=./prisma/schema.prisma
10-
COPY owl-api/unified-service/src ./src
11-
COPY owl-api/unified-service/tsconfig*.json ./
12-
COPY owl-api/unified-service/nest-cli.json ./
10+
COPY owl-api/src ./src
11+
COPY owl-api/tsconfig*.json ./
12+
COPY owl-api/nest-cli.json ./
1313
RUN pnpm run build
1414

1515
FROM base AS deps
1616
WORKDIR /app
17-
COPY owl-api/unified-service/package.json ./
17+
COPY owl-api/package.json ./
1818
RUN pnpm install --prod
1919
COPY --from=builder /app/node_modules/.prisma ./node_modules/.prisma
2020

@@ -26,7 +26,7 @@ COPY --from=deps /app/node_modules ./node_modules
2626
COPY --from=builder /app/dist ./dist
2727
COPY --from=builder /app/package.json ./package.json
2828
COPY --from=builder /app/prisma ./prisma
29-
COPY owl-api/user-service/start.sh ./start.sh
29+
COPY owl-api/start.sh ./start.sh
3030

3131
RUN chmod +x ./start.sh
3232

0 commit comments

Comments
 (0)