This commit is contained in:
@@ -34,21 +34,27 @@ jobs:
|
|||||||
- name: Clean up old images
|
- name: Clean up old images
|
||||||
run: docker image prune -f
|
run: docker image prune -f
|
||||||
|
|
||||||
# Email Notification (on success)
|
# Email notification using curl (Gmail SMTP)
|
||||||
- name: Send success email
|
- name: Send success email
|
||||||
if: success()
|
if: success()
|
||||||
uses: dawidd6/action-send-mail@v3
|
run: |
|
||||||
with:
|
curl --ssl-reqd \
|
||||||
server_address: smtp.gmail.com
|
--url "smtps://smtp.gmail.com:465" \
|
||||||
server_port: 587
|
--user "${{ secrets.EMAIL_USERNAME }}:${{ secrets.EMAIL_PASSWORD }}" \
|
||||||
username: ${{ secrets.EMAIL_USERNAME }}
|
--mail-from "${{ secrets.EMAIL_USERNAME }}" \
|
||||||
password: ${{ secrets.EMAIL_PASSWORD }}
|
--mail-rcpt "raghu6004@gmail.com" \
|
||||||
subject: '✅ Deployment Successful - rc-portfolio'
|
--upload-file - << EOF
|
||||||
to: raghu6004@gmail.com
|
From: GitHub Actions <${{ secrets.EMAIL_USERNAME }}>
|
||||||
from: GitHub Actions
|
To: your-email@example.com
|
||||||
body: |
|
Subject: ✅ Deployment Successful - Portfolio
|
||||||
Deployment completed successfully!
|
|
||||||
Repository: ${{ github.repository }}
|
Deployment completed successfully!
|
||||||
Branch: ${{ github.ref }}
|
|
||||||
Commit: ${{ github.sha }}
|
Repository: ${{ github.repository }}
|
||||||
Workflow: ${{ github.workflow }}
|
Branch: ${{ github.ref_name }}
|
||||||
|
Commit: ${{ github.sha }}
|
||||||
|
Workflow: ${{ github.workflow }}
|
||||||
|
Run: ${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }}
|
||||||
|
|
||||||
|
Time: $(date)
|
||||||
|
EOF
|
||||||
|
|||||||
Reference in New Issue
Block a user