Skip to content

Commit 2329baa

Browse files
committed
chore: slack notifications on failures
1 parent b8d2405 commit 2329baa

File tree

2 files changed

+40
-0
lines changed

2 files changed

+40
-0
lines changed

.github/workflows/ami-release.yml

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,3 +19,13 @@ jobs:
1919
run: |
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
22+
23+
- name: Slack Notification
24+
if: ${{ failure() }}
25+
uses: rtCamp/action-slack-notify@v2
26+
env:
27+
SLACK_WEBHOOK: ${{ secrets.SLACK_NOTIFICATIONS_WEBHOOK }}
28+
SLACK_USERNAME: 'gha-failures-notifier'
29+
SLACK_COLOR: 'danger'
30+
SLACK_MESSAGE: 'Building Postgres AMI failed'
31+
SLACK_FOOTER: ''

.github/workflows/dockerhub-release.yml

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -60,6 +60,16 @@ jobs:
6060
cache-from: type=gha
6161
cache-to: type=gha,mode=max
6262

63+
- name: Slack Notification
64+
if: ${{ failure() }}
65+
uses: rtCamp/action-slack-notify@v2
66+
env:
67+
SLACK_WEBHOOK: ${{ secrets.SLACK_NOTIFICATIONS_WEBHOOK }}
68+
SLACK_USERNAME: 'gha-failures-notifier'
69+
SLACK_COLOR: 'danger'
70+
SLACK_MESSAGE: 'Building Postgres x86 image failed'
71+
SLACK_FOOTER: ''
72+
6373
docker_arm_release:
6474
needs: settings
6575
runs-on: [arm-runner]
@@ -100,6 +110,16 @@ jobs:
100110
platforms: linux/${{ env.arch }}
101111
no-cache: true
102112

113+
- name: Slack Notification
114+
if: ${{ failure() }}
115+
uses: rtCamp/action-slack-notify@v2
116+
env:
117+
SLACK_WEBHOOK: ${{ secrets.SLACK_NOTIFICATIONS_WEBHOOK }}
118+
SLACK_USERNAME: 'gha-failures-notifier'
119+
SLACK_COLOR: 'danger'
120+
SLACK_MESSAGE: 'Building Postgres arm image failed'
121+
SLACK_FOOTER: ''
122+
103123
merge_manifest:
104124
needs: [settings, docker_x86_release, docker_arm_release]
105125
runs-on: ubuntu-latest
@@ -141,3 +161,13 @@ jobs:
141161
dst: |
142162
public.ecr.aws/supabase/postgres:${{ needs.settings.outputs.docker_version }}
143163
ghcr.io/supabase/postgres:${{ needs.settings.outputs.docker_version }}
164+
165+
- name: Slack Notification
166+
if: ${{ failure() }}
167+
uses: rtCamp/action-slack-notify@v2
168+
env:
169+
SLACK_WEBHOOK: ${{ secrets.SLACK_NOTIFICATIONS_WEBHOOK }}
170+
SLACK_USERNAME: 'gha-failures-notifier'
171+
SLACK_COLOR: 'danger'
172+
SLACK_MESSAGE: 'Building Postgres image failed'
173+
SLACK_FOOTER: ''

0 commit comments

Comments
 (0)