File tree Expand file tree Collapse file tree 1 file changed +21
-0
lines changed Expand file tree Collapse file tree 1 file changed +21
-0
lines changed Original file line number Diff line number Diff line change @@ -115,3 +115,24 @@ jobs:
115
115
- name : Terraform Apply
116
116
if : github.ref == 'refs/heads/main' && github.event_name == 'push'
117
117
run : terraform apply -auto-approve -input=false
118
+
119
+ - name : Send message to Slack via Workflow Builder
120
+
121
+ with :
122
+ payload : |
123
+ {
124
+ "channel-id": "${{ env.SLACK_CHANNEL_ID }}",
125
+ "inputs": "${{ env.INPUTS }}",
126
+ "message": "${{ env.MESSAGE }}",
127
+ "results-url": "${{ env.RESULTS_URL }}",
128
+ "workflow-url": "${{ env.WORKFLOW_URL }}"
129
+ }
130
+ env :
131
+ SLACK_WEBHOOK_URL : ${{ secrets.SLACK_WEBHOOK_URL }}
132
+ # #release-train-alerts
133
+ SLACK_CHANNEL_ID : C03B28HRP53
134
+ INPUTS : " N/A"
135
+ MESSAGE : " ${{ github.workflow }}/${{ github.job }} GitHub Actions workflow failed :sob:"
136
+ RESULTS_URL : " N/A"
137
+ WORKFLOW_URL : " ${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }}"
138
+ if : failure() && github.ref == 'refs/heads/main' && github.event_name == 'push'
You can’t perform that action at this time.
0 commit comments