Skip to content

Commit

Permalink
Update BuildMain.yml
Browse files Browse the repository at this point in the history
Adding email notification block for build compilation status
  • Loading branch information
infa-rvarahag authored Nov 4, 2024
1 parent c034894 commit 34443d8
Showing 1 changed file with 14 additions and 0 deletions.
14 changes: 14 additions & 0 deletions .github/workflows/BuildMain.yml
Original file line number Diff line number Diff line change
Expand Up @@ -32,3 +32,17 @@ jobs:
- name: Build with Maven
run: mvn clean compile # -B is for batch mode to reduce output noise

- name: Send Email Notification
if: always() # Run this step whether the tests succeed or fail
uses: dawidd6/action-send-mail@v3
with:
server_address: smtp.gmail.com # Replace with your SMTP server address
server_port: 587 # Typically 587 for TLS
username: ${{ secrets.SMTP_USERNAME }} # Stored in GitHub Secrets
password: ${{ secrets.SMTP_PASSWORD }} # Stored in GitHub Secrets
subject: "Test Status - ${{ github.workflow }}"
body: "The test run for the project has completed with status: ${{ job.status }}"
to: "sl-qa@shikshalokam.org" # Replace with recipient's email address
from: "automation@shikshalokam.org" # Replace with sender's email address
secure: true

0 comments on commit 34443d8

Please sign in to comment.