GHA: correct failed build message json
This commit is contained in:
15
.github/workflows/notify-failed-build.yml
vendored
15
.github/workflows/notify-failed-build.yml
vendored
@@ -26,23 +26,12 @@ jobs:
|
||||
{
|
||||
"attachments": [
|
||||
{
|
||||
"text": "${{ inputs.label }} ${{ inputs.link }}",
|
||||
"blocks": [
|
||||
{
|
||||
"type": "section",
|
||||
"text": {
|
||||
"type": "mrkdwn",
|
||||
"text": "${{ inputs.label }} ${{ inputs.link }}"
|
||||
}
|
||||
}
|
||||
],
|
||||
"pretext": "Build Failed",
|
||||
"color": "f0190a",
|
||||
"fields": [
|
||||
{
|
||||
"title": "Status",
|
||||
"title": "${{ inputs.label }} ${{ inputs.link }}",
|
||||
"short": true,
|
||||
"value": "Completed"
|
||||
"value": "Failed"
|
||||
}
|
||||
]
|
||||
}
|
||||
|
||||
48
.github/workflows/test-slack-message.yml
vendored
48
.github/workflows/test-slack-message.yml
vendored
@@ -4,32 +4,32 @@ on:
|
||||
workflow_dispatch:
|
||||
|
||||
jobs:
|
||||
slack-message:
|
||||
name: Send slack message
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- id: slack
|
||||
uses: slackapi/slack-github-action@e28cf165c92ffef168d23c5c9000cffc8a25e117
|
||||
env:
|
||||
SLACK_BOT_TOKEN: ${{ secrets.VMWARE_SLACK_BOT_TOKEN }}
|
||||
with:
|
||||
channel-id: "C0188MENU2J"
|
||||
payload: |
|
||||
{
|
||||
"text": "Test message title `Version` is available now",
|
||||
"blocks": [
|
||||
{
|
||||
"type": "section",
|
||||
"text": {
|
||||
"type": "mrkdwn",
|
||||
"text": "Test Message text `Version` is available now"
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
# slack-message:
|
||||
# name: Send slack message
|
||||
# runs-on: ubuntu-latest
|
||||
# steps:
|
||||
# - id: slack
|
||||
# uses: slackapi/slack-github-action@e28cf165c92ffef168d23c5c9000cffc8a25e117
|
||||
# env:
|
||||
# SLACK_BOT_TOKEN: ${{ secrets.VMWARE_SLACK_BOT_TOKEN }}
|
||||
# with:
|
||||
# channel-id: "C0188MENU2J"
|
||||
# payload: |
|
||||
# {
|
||||
# "text": "Test message title `Version` is available now",
|
||||
# "blocks": [
|
||||
# {
|
||||
# "type": "section",
|
||||
# "text": {
|
||||
# "type": "mrkdwn",
|
||||
# "text": "Test Message text `Version` is available now"
|
||||
# }
|
||||
# }
|
||||
# ]
|
||||
# }
|
||||
|
||||
notify-failure:
|
||||
needs: [ slack-message ]
|
||||
# needs: [ slack-message ]
|
||||
uses: ./.github/workflows/notify-failed-build.yml
|
||||
with:
|
||||
link: '[${{ github.run_id }}](${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }})'
|
||||
|
||||
Reference in New Issue
Block a user