forked from mohammad-taheri1/Book-Store-MERN-Stack
-
Notifications
You must be signed in to change notification settings - Fork 0
41 lines (36 loc) · 1.13 KB
/
main.yml
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
34
35
36
37
38
39
40
41
name: CI/CD Pipeline
on:
push:
branches:
- main
jobs:
build-and-push-frontend:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v3.5.3
- name: Build & push frontend Docker image
uses: mr-smithers-excellent/docker-build-push@v6
with:
directory: frontend
image: saurabhkr952/book-store-mern
tags: frontend-${{ github.sha }}
registry: docker.io
dockerfile: frontend/Dockerfile
username: ${{ secrets.DOCKER_USERNAME }}
password: ${{ secrets.DOCKER_PASSWORD }}
build-and-push-backend:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v3.5.3
- name: Build & push backend Docker image
uses: mr-smithers-excellent/docker-build-push@v6
with:
directory: backend
image: saurabhkr952/book-store-mern
tags: backend-${{ github.sha }}
registry: docker.io
dockerfile: backend/Dockerfile
username: ${{ secrets.DOCKER_USERNAME }}
password: ${{ secrets.DOCKER_PASSWORD }}