From 9bb5ff1b2282b4a079152ec278207339dae597bc Mon Sep 17 00:00:00 2001 From: Sean Hammond Date: Wed, 13 Sep 2023 12:27:14 +0100 Subject: [PATCH] Test Slack JSON payload --- .github/workflows/slack.yml | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) diff --git a/.github/workflows/slack.yml b/.github/workflows/slack.yml index a0ec888..499d465 100644 --- a/.github/workflows/slack.yml +++ b/.github/workflows/slack.yml @@ -9,6 +9,18 @@ jobs: uses: slackapi/slack-github-action@v1.24.0 with: channel-id: 'testing-github-actions-slack-bot' - slack-message: "GitHub build result: ${{ job.status }}\n${{ github.event.pull_request.html_url || github.event.head_commit.url }}" + payload: | + { + "text": "GitHub Action build result: ${{ job.status }}\n${{ github.event.pull_request.html_url || github.event.head_commit.url }}", + "blocks": [ + { + "type": "section", + "text": { + "type": "mrkdwn", + "text": "GitHub Action build result: ${{ job.status }}\n${{ github.event.pull_request.html_url || github.event.head_commit.url }}" + } + } + ] + } env: SLACK_BOT_TOKEN: ${{ secrets.SLACK_BOT_TOKEN }}