Update to different slack action

This commit is contained in:
agobrech 2023-05-22 14:36:28 +02:00
parent 5c05c34d1a
commit 397d10c5c4
2 changed files with 34 additions and 5 deletions

29
.github/payloadSlack.json vendored Normal file
View file

@ -0,0 +1,29 @@
{
"blocks": [
{
"type": "header",
"text": {
"type": "plain_text",
"text": " 🛑 Test Workflow Failed 🛑",
"emoji": true
}
},
{
"type": "section",
"text": {
"type": "mrkdwn",
"text": "<${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }}| Test Workflow > for `${{github.event.pull_request.title}}`"
}
},
{
"type": "divider"
},
{
"type": "section",
"text": {
"type": "mrkdwn",
"text": "${{ steps.tests.outputs.slackMessage}}"
}
}
]
}

View file

@ -81,10 +81,10 @@ jobs:
SKIP_STATISTICS_EVENTS: true
- name: Notify Slack on failure
uses: act10ns/slack@v2.0.0
uses: slackapi/slack-github-action@v1.24.0
if: failure()
env:
SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK_URL }}
with:
status: ${{ job.status }}
channel: '#updates-build-alerts-test'
webhook-url: ${{ secrets.SLACK_WEBHOOK_URL }}
# message: ${{ steps.tests.outputs.slackMessage}} / (${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }})
payload-file-path: '../payloadSlack.json'
channel-id: '#updates-build-alerts-test'