From 51c66edc99574b17c6370f23f8bf138095e242b3 Mon Sep 17 00:00:00 2001 From: Liora Milbaum Date: Sun, 7 Apr 2024 01:26:49 +0300 Subject: [PATCH] Improve Slack message formatting Signed-off-by: Liora Milbaum --- .github/workflows/testing-framework.yaml | 27 ++++++++++++++++++++---- 1 file changed, 23 insertions(+), 4 deletions(-) diff --git a/.github/workflows/testing-framework.yaml b/.github/workflows/testing-framework.yaml index 40302516..13fe0129 100644 --- a/.github/workflows/testing-framework.yaml +++ b/.github/workflows/testing-framework.yaml @@ -6,9 +6,9 @@ on: workflow_dispatch: - # pull_request: ## temporary for debugging development purposes - # branches: - # - main + pull_request: ## temporary for debugging development purposes + branches: + - main env: TF_VAR_aws_region: "eu-west-2" @@ -94,7 +94,26 @@ jobs: with: payload: | { - "text": "${{ github.workflow }} workflow status: ${{ job.status }}\n${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }}" + "blocks": [ + { + "type": "rich_text", + "elements": [ + { + "type": "rich_text_section", + "elements": [ + { + "type": "link", + "url": "${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }}", + "text": "${{ github.workflow }} workflow status: ${{ job.status }}", + "style": { + "bold": true + } + } + ] + } + ] + } + ] } env: SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK_URL }}