Skip to content

Commit

Permalink
added cicd workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
Saurabhkr952 authored Oct 21, 2023
1 parent 622cff1 commit 41c9708
Showing 1 changed file with 39 additions and 0 deletions.
39 changes: 39 additions & 0 deletions .github/workflows/ci/ci-cd.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
name: CI/CD Pipeline

on:
push:
branches:
- main

jobs:
build-and-push-frontend:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v2

- name: Build & push frontend Docker image
uses: mr-smithers-excellent/docker-build-push@v6
with:
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@v2

- name: Build & push backend Docker image
uses: mr-smithers-excellent/docker-build-push@v6
with:
image: saurabhkr952/dev-portfolio-backend
tags: backend-${{ github.sha }}
registry: docker.io
dockerfile: backend/Dockerfile
username: ${{ secrets.DOCKER_USERNAME }}
password: ${{ secrets.DOCKER_PASSWORD }}

0 comments on commit 41c9708

Please sign in to comment.