Skip to content

Update welcome message #13

Update welcome message

Update welcome message #13

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
- name: Configure AWS credentials
uses: aws-actions/configure-aws-credentials@v4
with:
aws-access-key-id: ${{ secrets.AWS_ACCESS_KEY_ID }}
aws-secret-access-key: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
aws-region: ${{ secrets.AWS_REGION }}
- name: Login to Amazon ECR
id: login-ecr
uses: aws-actions/amazon-ecr-login@v2