Skip to content

Commit e599cb8

Browse files
Update CAdeploy.yml (#592)
1 parent cad2b9c commit e599cb8

File tree

1 file changed

+11
-4
lines changed

1 file changed

+11
-4
lines changed

.github/workflows/CAdeploy.yml

Lines changed: 11 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -519,9 +519,16 @@ jobs:
519519
if: failure() || needs.deploy.result == 'failure' || needs.e2e-test.result == 'failure'
520520
run: |
521521
RUN_URL="https://github.com/${{ github.repository }}/actions/runs/${{ github.run_id }}"
522+
523+
# Construct the email body
524+
EMAIL_BODY=$(cat <<EOF
525+
{
526+
"body": "<p>Dear Team,</p><p>We would like to inform you that the Build-your-own-copilot-Solution-Accelerator(Client Advisior) Automation process has encountered an issue and has failed to complete successfully.</p><p><strong>Build URL:</strong> ${RUN_URL}<br> ${OUTPUT}</p><p>Please investigate the matter at your earliest convenience.</p><p>Best regards,<br>Your Automation Team</p>"
527+
}
528+
EOF
529+
)
530+
531+
# Send the notification
522532
curl -X POST "${{ secrets.LOGIC_APP_URL }}" \
523533
-H "Content-Type: application/json" \
524-
-d '{
525-
"subject": "CA Deployment Failed",
526-
"body": "<p>The CA Deployment pipeline failed.</p><p><a href=\"'${RUN_URL}'\">View Run</a></p>"
527-
}'
534+
-d "$EMAIL_BODY" || echo "Failed to send notification"

0 commit comments

Comments
 (0)