File tree Expand file tree Collapse file tree 1 file changed +30
-1
lines changed Expand file tree Collapse file tree 1 file changed +30
-1
lines changed Original file line number Diff line number Diff line change 9
9
pull_request :
10
10
branches :
11
11
- main
12
+ schedule :
13
+ # “At 00:00 on Sunday.”
14
+ - cron : " 0 0 * * 0"
15
+ workflow_dispatch :
12
16
13
17
jobs :
14
- terraform :
18
+ cdk :
15
19
name : Setup infrastructure using CDK
16
20
runs-on : ubuntu-latest
17
21
steps :
63
67
retry_wait_seconds : 10
64
68
command : |
65
69
yarn cdklocal deploy
70
+
71
+ - name : Send a Slack notification
72
+ if : failure() || github.event_name != 'pull_request'
73
+ uses : ravsamhq/notify-slack-action@v2
74
+ with :
75
+ status : ${{ job.status }}
76
+ token : ${{ secrets.GITHUB_TOKEN }}
77
+ notification_title : " {workflow} has {status_message}"
78
+ message_format : " {emoji} *{workflow}* {status_message} in <{repo_url}|{repo}>"
79
+ footer : " Linked Repo <{repo_url}|{repo}> | <{run_url}|View Workflow run>"
80
+ notify_when : " failure"
81
+ env :
82
+ SLACK_WEBHOOK_URL : ${{ secrets.SLACK_WEBHOOK_URL }}
83
+
84
+ - name : Generate a Diagnostic Report
85
+ if : failure()
86
+ run : |
87
+ curl -s localhost:4566/_localstack/diagnose | gzip -cf > diagnose.json.gz
88
+
89
+ - name : Upload the Diagnostic Report
90
+ if : failure()
91
+ uses : actions/upload-artifact@v3
92
+ with :
93
+ name : diagnose.json.gz
94
+ path : ./diagnose.json.gz
You can’t perform that action at this time.
0 commit comments