Testing different Slack action

This commit is contained in:
Johannes Klein
2024-03-28 15:00:52 +01:00
parent 16e57af66c
commit fb072e65e3

View File

@@ -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