Skip to content

Commit

Permalink
fix: The workflow file is updated.
Browse files Browse the repository at this point in the history
  • Loading branch information
Suraj-kumar00 committed Oct 9, 2024
1 parent 5e9e85b commit fc4f3f0
Showing 1 changed file with 8 additions and 6 deletions.
14 changes: 8 additions & 6 deletions .github/workflows/build-docker.yaml
Original file line number Diff line number Diff line change
@@ -1,26 +1,28 @@
name: Build and Push Docker Image
name: CI Pipeline

on:
push:
branches: [ "main" ]
workflow_dispatch: # This allows manual triggering of the workflow
workflow_dispatch:

jobs:
build:
runs-on: ubuntu-latest

steps:
- name: Checkout code
uses: actions/checkout@v3
- uses: actions/checkout@v3

- name: Login to DockerHub
env:
DOCKER_USERNAME: ${{ secrets.DOCKER_USERNAME }}
DOCKER_USERNAME: ${{ secrets.DOCKERHUB_USERNAME }}
DOCKER_PASSWORD: ${{ secrets.DOCKER_PASSWORD }}
run: docker login -u $DOCKER_USERNAME -p $DOCKER_PASSWORD
run: echo $DOCKER_PASSWORD | docker login -u $DOCKERHUB_USERNAME --password-stdin

- name: Build the Docker image
run: docker build -t surajkumar00/devops-url2qr-api .

- name: Push the Docker image to DockerHub
run: docker push surajkumar00/devops-url2qr-api



0 comments on commit fc4f3f0

Please sign in to comment.