Skip to content

Commit 3086599

Browse files
Merge pull request #1741 from metal3-io-bot/cherry-pick-1687-to-release-0.6
🌱 Add Slack notification for image build workflow failure
2 parents 96a80be + 557ba4b commit 3086599

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)