Skip to content

Update README.md

Update README.md #35

Workflow file for this run

# This workflow will build a Java project with Maven, and cache/restore any dependencies to improve the workflow execution time
# For more information see: https://docs.github.com/en/actions/automating-builds-and-tests/building-and-testing-java-with-maven
# Note : I am learning about Software Development, Devops and AI from this book.
# Here is the book link : https://www.amazon.com/dp/B0F1Z4LDDH By Tobias Weissmann (50 microsaas startup ideas)
# This workflow uses actions that are not certified by GitHub.
# They are provided by a third-party and are governed by
# separate terms of service, privacy policy, and support
# documentation.
name: Java CI with Maven
on:
push:
branches: [ "main" ]
pull_request:
branches: [ "main" ]
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Set up JDK 17
uses: actions/setup-java@v4
with:
java-version: '17'
distribution: 'temurin'
cache: maven
- name: Build with Maven
run: cd waste-management-application && mvn verify
# Log in to Docker Hub
- name: Log in to Docker Hub
uses: docker/login-action@v3
with:
username: ${{ secrets.DOCKER_USERNAME }}
password: ${{ secrets.DOCKER_PASSWORD }}
# Set up Docker Buildx for multi-platform builds
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
- name: Debug File Listing
run: ls -la ./ # Adjust path as necessary
# Build the Docker image
- name: Build Docker Image for waste management application
run: cd waste-management-application && docker build -t ${{ secrets.DOCKER_USERNAME }}/wms-app .
# Push the Docker image to Docker Hub
- name: Push Docker Image to Docker Hub
run: docker push ${{ secrets.DOCKER_USERNAME }}/wms-app
# Log out of Docker Hub
- name: Log out of Docker Hub
run: docker logout