From ed687727490376e0d4182823cb9c994804c9124c Mon Sep 17 00:00:00 2001 From: Daniel Colina Date: Mon, 2 Sep 2024 12:04:13 +0200 Subject: [PATCH] #28259 Fixing the cicd reports. --- .../notification/notify-slack/action.yaml | 14 ++++++++++++++ .github/workflows/cicd_post-workflow-reporting.yml | 1 + 2 files changed, 15 insertions(+) diff --git a/.github/actions/core-cicd/notification/notify-slack/action.yaml b/.github/actions/core-cicd/notification/notify-slack/action.yaml index 42e435789ebf..53f0cdeeff72 100644 --- a/.github/actions/core-cicd/notification/notify-slack/action.yaml +++ b/.github/actions/core-cicd/notification/notify-slack/action.yaml @@ -10,11 +10,16 @@ inputs: slack-bot-token: description: 'Slack Bot Token' required: true + json: + description: 'Boolean flag to indicate if the payload is already a JSON object' + required: false + default: 'false' runs: using: "composite" steps: - name: Slack Notification + if: inputs.json == 'false' uses: slackapi/slack-github-action@v1.26.0 with: channel-id: ${{ inputs.channel-id }} @@ -32,3 +37,12 @@ runs: } env: SLACK_BOT_TOKEN: ${{ inputs.slack-bot-token }} + + - name: Slack Notification with JSON + if: inputs.json == 'true' + uses: slackapi/slack-github-action@v1.26.0 + with: + channel-id: ${{ inputs.channel-id }} + payload: ${{ inputs.payload }} + env: + SLACK_BOT_TOKEN: ${{ inputs.slack-bot-token }} diff --git a/.github/workflows/cicd_post-workflow-reporting.yml b/.github/workflows/cicd_post-workflow-reporting.yml index a935cd7ed5d0..c8bb5622c599 100644 --- a/.github/workflows/cicd_post-workflow-reporting.yml +++ b/.github/workflows/cicd_post-workflow-reporting.yml @@ -270,4 +270,5 @@ jobs: with: channel-id: ${{ vars.SLACK_REPORT_CHANNEL }} payload: ${{ steps.prepare-slack-message.outputs.payload }} + json: true slack-bot-token: ${{ secrets.SLACK_BOT_TOKEN }}