Skip to content

Update main.yml

Update main.yml #7

Workflow file for this run

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
with:
repository: Saurabhkr952/Book-Store-MERN-Stack
- 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
with:
path: backend
- name: Build & push backend Docker image
uses: mr-smithers-excellent/docker-build-push@v6
with:
directory: frontend
image: saurabhkr952/book-store-mern
tags: backend-${{ github.sha }}
registry: docker.io
dockerfile: backend/Dockerfile
username: ${{ secrets.DOCKER_USERNAME }}
password: ${{ secrets.DOCKER_PASSWORD }}