Skip to content

Update README.md

Update README.md #11

Workflow file for this run

name: CI/CD Pipeline # Name of the CI/CD Pipeline
on:
push:
branches: [ "main" ] # Trigger on push events to the main branch
pull_request:
branches: [ "main" ] # Trigger on pull requests to the main branch
jobs:
build:
runs-on: ubuntu-latest # Runs on the latest version of Ubuntu | Default operating system environment for workflows unless explicitly specified.
steps:
- name: Checkout code # Step to checkout the code from the repository | Fetch the source code repository into the runner machine where our workflow is executing.
uses: actions/checkout@v4
- name: Set up JDK 17 # Step to set up JDK 17
uses: actions/setup-java@v3
with:
java-version: '17'
distribution: 'temurin'
cache: maven
- name: Build with Maven # Step to build the project with Maven
run: mvn clean install
- name: Login to DockerHub # Step to login to DockerHub
run: docker login -u ${{secrets.DOCKER_USERNAME}} -p ${{secrets.DOCKER_PASSWORD}}
- name: Build Docker image # Step to build the Docker image
run: docker build -t dharshib/springboot-ci-cd .
- name: Push the image to DockerHub # Step to push the Docker image to DockerHub
run: docker push dharshib/springboot-ci-cd:latest