GHA: roll put slack build failed notification
This commit is contained in:
35
.github/workflows/notify-failed.yml
vendored
Normal file
35
.github/workflows/notify-failed.yml
vendored
Normal file
@@ -0,0 +1,35 @@
|
||||
name: Notify Failed
|
||||
|
||||
on:
|
||||
workflow_call:
|
||||
inputs:
|
||||
md_message:
|
||||
description: Markdown message
|
||||
required: true
|
||||
type: string
|
||||
|
||||
jobs:
|
||||
notify-failure:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- id: tools-team-slack
|
||||
uses: slackapi/slack-github-action@e28cf165c92ffef168d23c5c9000cffc8a25e117
|
||||
env:
|
||||
SLACK_BOT_TOKEN: ${{ secrets.VMWARE_SLACK_BOT_TOKEN }}
|
||||
with:
|
||||
channel-id: "C0188MENU2J"
|
||||
payload: |
|
||||
{
|
||||
"text": "${{ inputs.md_message }}",
|
||||
"blocks": [
|
||||
{
|
||||
"type": "section",
|
||||
"text": {
|
||||
"type": "mrkdwn",
|
||||
"text": ":fail: ${{ inputs.md_message }}"
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user