Skip to content

Commit

Permalink
Pushing image to docker registry
Browse files Browse the repository at this point in the history
  • Loading branch information
Daoud-Hussain authored Nov 16, 2024
1 parent 16026a8 commit ca83bcc
Showing 1 changed file with 17 additions and 4 deletions.
21 changes: 17 additions & 4 deletions .github/workflows/prod-cicd.yml
Original file line number Diff line number Diff line change
@@ -1,16 +1,17 @@

name: Stagging CI/CD Pipeline
name: Production CI/CD Pipeline
on:
push:
branches:
- stagging
- main
pull_request:
branches:
- dev
- stagging
env:
IMAGE_NAME: daoudhussaindev/next-js-app
NODE_VERSION: 18.x
AWS_REGION: ap-south-1
DOCKER_USERNAME: ${{ secrets.DOCKER_USERNAME_DEV }}
DOCKER_PASSWORD: ${{ secrets.DOCKER_PASSWORD_DEV }}

jobs:
build:
Expand Down Expand Up @@ -105,3 +106,15 @@ jobs:
echo 'Deployment completed successfully'
"
- name: Log in to DockerHub
run: |
echo $DOCKER_PASSWORD | docker login --username $DOCKER_USERNAME --password-stdin
- name: Build Docker image
run: |
docker build -t ${{ env.IMAGE_NAME }}:latest .
- name: Push Docker image to Docker Hub
run: |
docker push ${{ env.IMAGE_NAME }}:latest

0 comments on commit ca83bcc

Please sign in to comment.