Skip to content

Commit

Permalink
Revert "Revert "Try using blocks syntax again""
Browse files Browse the repository at this point in the history
This reverts commit 2c4d3cd.
  • Loading branch information
andrewmogan committed Aug 28, 2024
1 parent 6ca3f23 commit 0670314
Show file tree
Hide file tree
Showing 2 changed files with 23 additions and 4 deletions.
24 changes: 20 additions & 4 deletions .github/workflows/nightly-v4-integtest.yml
Original file line number Diff line number Diff line change
Expand Up @@ -115,9 +115,25 @@ jobs:
# Variables used by the Slack workflow
payload: |
{
"workflow_name": "${{ github.workflow }}",
"workflow_url": "${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }}",
"workflow_status": "${{ contains(join(needs.*.result, ' '), 'failure') && 'failure' || 'success' }}"
"blocks": [
{
"type": "header",
"text": {
"type": "plain_text",
"text": "GitHub Actions Failure :x:",
"emoji": true
}
},
{"type": "divider"},
{
"type": "section",
"text": {
"type": "mrkdwn",
"text": "*Workflow:* `${{ github.workflow }}` has failed. View the full output here: <${{ env.WORKFLOW_URL }}|GitHub Actions Run Output>"
}
}
]
}
env:
SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK_URL }}
SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK_URL }}
WORKFLOW_URL: ${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }}
3 changes: 3 additions & 0 deletions .github/workflows/slack-webhook-payload.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
{
"text": "A GitHub Action Event ${{ github.eventName }} has ${{ env.JOB_STATUS }}"
}

0 comments on commit 0670314

Please sign in to comment.