Skip to content

Commit 557ba4b

Browse files
NymanRobinmetal3-io-bot
authored andcommitted
Add Slacks notification for GH actions
Adds Slack notification for EST internal teams slack channel for jobs that run on push. So a wider audience can more quickly detect failures. Signed-off-by: NymanRobin <robin.nyman@est.tech>
1 parent 96a80be commit 557ba4b

1 file changed

Lines changed: 10 additions & 0 deletions

File tree

.github/workflows/build-images-action.yml

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -44,3 +44,13 @@ jobs:
4444
"BUILD_CONTAINER_IMAGE_GIT_REFERENCE": "${{ github.ref }}"
4545
}
4646
job_timeout: "1000"
47+
- name: Slack Notification on Failure
48+
if: ${{ failure() }}
49+
uses: rtCamp/action-slack-notify@4e5fb42d249be6a45a298f3c9543b111b02f7907 # 2.3.0
50+
env:
51+
SLACK_TITLE: 'GitHub Action Failed in ${{ github.repository }}'
52+
SLACK_COLOR: '#FF0000'
53+
SLACK_MESSAGE: 'The GitHub Action workflow failed for baremetal operator image build.'
54+
SLACK_WEBHOOK: ${{ secrets.SLACK_WEBHOOK }}
55+
SLACK_CHANNEL: metal3-github-actions-notify
56+
SLACK_USERNAME: metal3-github-actions-notify

0 commit comments

Comments
 (0)