Skip to content

feat: The frontend docker build and push is added in the workflow. #12

feat: The frontend docker build and push is added in the workflow.

feat: The frontend docker build and push is added in the workflow. #12

Workflow file for this run

name: Docker Build and Push
on:
push:
branches:
- main
workflow_dispatch:
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Log in to DockerHub
run: echo "${{ secrets.DOCKER_PASSWORD }}" | docker login -u "${{ secrets.DOCKER_USERNAME }}" --password-stdin
- name: Build Docker image
run: |
docker build ./api/ -t surajkumar00/devops-url2qr-api:latest
docker build ./front-end-nextjs/ -t surajkumar00/devops-url2qr-frontend:latest
- name: Push Docker image to DockerHub
run: |
docker push surajkumar00/devops-url2qr-api:latest
docker push surajkumar00/devops-url2qr-frontend:latest