Skip to content

add sending emails from notification-service #1

add sending emails from notification-service

add sending emails from notification-service #1

name: Notification Service
on:
push:
paths:
- notification-service/**
branches:
- '**'
jobs:
build:
name: Build
runs-on: ubuntu-latest
env:
working-directory: ./notification-service
DOCKER_IMAGE_NAME: ${{ secrets.DOCKERHUB_USERNAME }}/bookstore-notification-service
defaults:
run:
working-directory: ${{ env.working-directory }}
steps:
- uses: actions/checkout@v4
- name: Setup Java 21
uses: actions/setup-java@v4
with:
java-version: '21'
distribution: 'temurin'
cache: 'maven'
- name: Build with Maven
run: ./mvnw -ntp verify
- name: Login to Docker Hub
uses: docker/login-action@v3
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}
- name: Build and Publish Docker Image
run: |
./mvnw spring-boot:build-image -DskipTests
echo "Pushing the image $DOCKER_IMAGE_NAME to Docker Hub."
docker push $DOCKER_IMAGE_NAME