This commit is contained in:
@@ -38,23 +38,19 @@ jobs:
|
||||
- name: Send success email
|
||||
if: success()
|
||||
run: |
|
||||
cat > /tmp/email.txt << 'ENDMAIL'
|
||||
From: GitHub Actions
|
||||
To: raghu6004@gmail.com
|
||||
Subject: Deployment Successful - Portfolio
|
||||
|
||||
Deployment completed successfully!
|
||||
ENDMAIL
|
||||
|
||||
curl --ssl-reqd \
|
||||
--url "smtps://smtp.gmail.com:465" \
|
||||
--user "${{ secrets.EMAIL_USERNAME }}:${{ secrets.EMAIL_PASSWORD }}" \
|
||||
--mail-from "${{ secrets.EMAIL_USERNAME }}" \
|
||||
--mail-rcpt "your-email@example.com" \
|
||||
--upload-file - <<'EOF'
|
||||
From: GitHub Actions <${{ secrets.EMAIL_USERNAME }}>
|
||||
To: your-email@example.com
|
||||
Subject: Deployment Successful - Portfolio
|
||||
--mail-rcpt "raghu6004@gmail.com" \
|
||||
--upload-file /tmp/email.txt
|
||||
|
||||
Deployment completed successfully!
|
||||
|
||||
Repository: ${{ github.repository }}
|
||||
Branch: ${{ github.ref_name }}
|
||||
Commit: ${{ github.sha }}
|
||||
Workflow: ${{ github.workflow }}
|
||||
Run: ${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }}
|
||||
|
||||
Time: $(date)
|
||||
EOF
|
||||
rm /tmp/email.txt
|
||||
|
||||
Reference in New Issue
Block a user