-
Notifications
You must be signed in to change notification settings - Fork 0
33 lines (27 loc) · 1.99 KB
/
deploy.yml
File metadata and controls
33 lines (27 loc) · 1.99 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
name: Build and Deploy
on:
push:
branches:
- main
jobs:
build-and-push:
runs-on: ubuntu-latest
steps:
- name: Checkout Code
uses: actions/checkout@v3
- name: Set Up Docker Buildx
uses: docker/setup-buildx-action@v2
- name: Log In To Docker Hub
uses: docker/login-action@v2
with:
username: ${{ secrets.DOCKER_USERNAME }}
password: ${{ secrets.DOCKER_PASSWORD }}
- name: Build And Push Docker Image
run: |
docker buildx build --platform linux/amd64,linux/arm64 -t songminkyu/fc-nestjs-gateway:latest -t songminkyu/fc-nestjs-gateway:${{ github.sha }} -f ./apps/gateway/Dockerfile --target production --push .
docker buildx build --platform linux/amd64,linux/arm64 -t songminkyu/fc-nestjs-notification:latest -t songminkyu/fc-nestjs-notification:${{ github.sha }} -f ./apps/notification/Dockerfile --target production --push .
docker buildx build --platform linux/amd64,linux/arm64 -t songminkyu/fc-nestjs-order:latest -t songminkyu/fc-nestjs-order:${{ github.sha }} -f ./apps/order/Dockerfile --target production --push .
docker buildx build --platform linux/amd64,linux/arm64 -t songminkyu/fc-nestjs-payment-command:latest -t songminkyu/fc-nestjs-payment-command:${{ github.sha }} -f ./apps/payment-command/Dockerfile --target production --push .
docker buildx build --platform linux/amd64,linux/arm64 -t songminkyu/fc-nestjs-payment-query:latest -t songminkyu/fc-nestjs-payment-query:${{ github.sha }} -f ./apps/payment-query/Dockerfile --target production --push .
docker buildx build --platform linux/amd64,linux/arm64 -t songminkyu/fc-nestjs-product:latest -t songminkyu/fc-nestjs-product:${{ github.sha }} -f ./apps/product/Dockerfile --target production --push .
docker buildx build --platform linux/amd64,linux/arm64 -t songminkyu/fc-nestjs-user:latest -t songminkyu/fc-nestjs-user:${{ github.sha }} -f ./apps/user/Dockerfile --target production --push .