Skip to content

Commit c2c1b30

Browse files
committed
chore: notify on AMI build cancel
1 parent 08e0465 commit c2c1b30

File tree

1 file changed

+11
-1
lines changed

1 file changed

+11
-1
lines changed

.github/workflows/ami-release.yml

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ jobs:
2020
GIT_SHA=$(git rev-parse HEAD)
2121
packer build -var "git-head-version=${GIT_SHA}" -var-file="development-arm.vars.pkr.hcl" -var-file="common.vars.pkr.hcl" amazon-arm64.pkr.hcl
2222
23-
- name: Slack Notification
23+
- name: Slack Notification on Failure
2424
if: ${{ failure() }}
2525
uses: rtCamp/action-slack-notify@v2
2626
env:
@@ -29,3 +29,13 @@ jobs:
2929
SLACK_COLOR: 'danger'
3030
SLACK_MESSAGE: 'Building Postgres AMI failed'
3131
SLACK_FOOTER: ''
32+
33+
- name: Slack Notification on Cancel
34+
if: ${{ cancelled() }}
35+
uses: rtCamp/action-slack-notify@v2
36+
env:
37+
SLACK_WEBHOOK: ${{ secrets.SLACK_NOTIFICATIONS_WEBHOOK }}
38+
SLACK_USERNAME: 'gha-failures-notifier'
39+
SLACK_COLOR: 'danger'
40+
SLACK_MESSAGE: 'Postgres AMI build cancelled. Reminder to clean up any Packer instances that may have been left running. @group-infra'
41+
SLACK_FOOTER: ''

0 commit comments

Comments
 (0)