Skip to content

Commit 8ab1507

Browse files
Merge pull request #70 from DefangLabs/notify-failure
Notify slack if deploy action fails
2 parents 013cc91 + f7361cf commit 8ab1507

File tree

1 file changed

+9
-1
lines changed

1 file changed

+9
-1
lines changed

.github/workflows/deploy.yml

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -92,4 +92,12 @@ jobs:
9292
user_email: 41898282+github-actions[bot]@users.noreply.github.com
9393
cname: docs.defang.io
9494

95-
95+
- name: Notify Slack of Action Failures
96+
uses: ravsamhq/[email protected]
97+
if: ${{ always() && github.ref_name == 'main' }}
98+
with:
99+
status: ${{ job.status }}
100+
notify_when: "failure"
101+
notification_title: "{workflow} is failing"
102+
env:
103+
SLACK_WEBHOOK_URL: ${{ secrets.SLACK_NOTIFIER_WEBHOOK_URL }}

0 commit comments

Comments
 (0)