From 1e9744d7a9b4c28cb71444d67a67410b49aa54c4 Mon Sep 17 00:00:00 2001 From: sangeet-joy_xero Date: Fri, 18 Oct 2024 13:21:59 +0530 Subject: [PATCH] updated the payload with dynamic data --- .github/actions/notify-slack/action.yml | 22 ++++++++++++++++++---- 1 file changed, 18 insertions(+), 4 deletions(-) diff --git a/.github/actions/notify-slack/action.yml b/.github/actions/notify-slack/action.yml index ea09f799..2b1ca528 100644 --- a/.github/actions/notify-slack/action.yml +++ b/.github/actions/notify-slack/action.yml @@ -57,7 +57,21 @@ runs: "type": "section", "text": { "type": "mrkdwn", - "text": "GitHub Action build result: ${{ job.status }}\n${{ github.event.pull_request.html_url || github.event.head_commit.url }}" + "text": "**${{inputs.heading_text}}**" + } + }, + { + "type": "section", + "text": { + "type": "mrkdwn", + "text": "Job status: **${{ job.status }}**" + } + }, + { + "type": "section", + "text": { + "type": "mrkdwn", + "text": "PR: ${{ github.event.pull_request.html_url || github.event.head_commit.url }}" } }, { @@ -70,16 +84,16 @@ runs: "text": "Check the logs", "emoji": true }, - "url": "https://google.com" + "url": "${{inputs.job_url}}" }, { "type": "button", "text": { "type": "plain_text", - "text": ":github repo: ${{github.event.repository.name}}", + "text": "github repo: ${{github.event.repository.name}}", "emoji": true }, - "url": "https://google.com" + "url": "${{github.server_url}}/${{github.repository}}" } ] }