From fb072e65e34faf52839bbd281993a0321584d461 Mon Sep 17 00:00:00 2001 From: Johannes Klein Date: Thu, 28 Mar 2024 15:00:52 +0100 Subject: [PATCH] Testing different Slack action --- .github/workflows/test.yml | 21 ++++++++++++++++++--- 1 file changed, 18 insertions(+), 3 deletions(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 1ee8dc817..fe5da83f8 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -43,8 +43,23 @@ jobs: if: ${{ success() || failure() }} runs-on: ubuntu-latest steps: - - uses: iRoachie/slack-github-actions@v2.3.0 - if: env.SLACK_WEBHOOK_URL != null + - uses: slackapi/slack-github-action@v1.25.0 + with: + # For posting a rich message using Block Kit + 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_WEBHOOK_URL: ${{ secrets.SLACK_BUILDS_WEBHOOK_URL }} - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + SLACK_WEBHOOK_TYPE: INCOMING_WEBHOOK + \ No newline at end of file