Skip to content

Commit

Permalink
Add slack notification on failure
Browse files Browse the repository at this point in the history
  • Loading branch information
shub-kris committed Jan 30, 2024
1 parent fb9d397 commit 7c1a513
Showing 1 changed file with 11 additions and 1 deletion.
12 changes: 11 additions & 1 deletion .github/workflows/build-ami.yml
Original file line number Diff line number Diff line change
Expand Up @@ -61,4 +61,14 @@ jobs:
id: build
run: |
packer build -var "optimum_neuron_tag=${{ steps.determine-tag.outputs.TAG }}" hcl2-files
- name: Slack Notification on Failure
if: ${{ failure() && github.event_name == 'schedule' }}
uses: rtCamp/action-slack-notify@v2
env:
SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK_URL }}
SLACK_CHANNEL: ${{ secrets.SLACK_CHANNEL }}
SLACK_USERNAME: 'GitHub Action Optimum Neuron AMI'
SLACK_ICON_EMOJI: ':bell:'
SLACK_COLOR: 'danger'
SLACK_TITLE: 'Build AWS Neuron AMI Failed'

0 comments on commit 7c1a513

Please sign in to comment.