Skip to content

Commit 7c1a513

Browse files
committed
Add slack notification on failure
1 parent fb9d397 commit 7c1a513

File tree

1 file changed

+11
-1
lines changed

1 file changed

+11
-1
lines changed

.github/workflows/build-ami.yml

+11-1
Original file line numberDiff line numberDiff line change
@@ -61,4 +61,14 @@ jobs:
6161
id: build
6262
run: |
6363
packer build -var "optimum_neuron_tag=${{ steps.determine-tag.outputs.TAG }}" hcl2-files
64-
64+
65+
- name: Slack Notification on Failure
66+
if: ${{ failure() && github.event_name == 'schedule' }}
67+
uses: rtCamp/action-slack-notify@v2
68+
env:
69+
SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK_URL }}
70+
SLACK_CHANNEL: ${{ secrets.SLACK_CHANNEL }}
71+
SLACK_USERNAME: 'GitHub Action Optimum Neuron AMI'
72+
SLACK_ICON_EMOJI: ':bell:'
73+
SLACK_COLOR: 'danger'
74+
SLACK_TITLE: 'Build AWS Neuron AMI Failed'

0 commit comments

Comments
 (0)