Skip to content

Commit 4ef14e7

Browse files
committed
[NDR-313] Update slack message
1 parent 8d55621 commit 4ef14e7

File tree

1 file changed

+28
-2
lines changed

1 file changed

+28
-2
lines changed

.github/workflows/ndr-e2e-test-sandbox.yml

Lines changed: 28 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -68,11 +68,37 @@ jobs:
6868
echo "SLACK_BOT_TOKEN=$slack_bot_token" >> $GITHUB_ENV
6969
7070
- name: Send Slack Notification
71-
uses: slackapi/slack-github-action@91efab103c0de0a537f72a35f6b8cda0ee76bf0a # Version v2.1.1
71+
uses: slackapi/[email protected]
7272
with:
7373
method: chat.postMessage
7474
token: ${{ env.SLACK_BOT_TOKEN }}
7575
payload: |
7676
channel: ${{ vars.ALERTS_SLACK_CHANNEL_ID }}
77-
text: "Workflow has run"
77+
attachments:
78+
- color: ${{ (needs.services-e2etest.result == 'success' && needs.services-fhir-api-e2etest.result == 'success') && '#36a64f' || '#ff0000' }}
79+
blocks:
80+
- type: header
81+
text:
82+
type: plain_text
83+
text: ${{ (needs.services-e2etest.result == 'success' && needs.services-fhir-api-e2etest.result == 'success') && '✅ Workflow SANDBOX: E2e Tests Backend succeeded' || '❌ Workflow SANDBOX: E2e Tests Backend failed' }}
84+
- type: section
85+
text:
86+
type: mrkdwn
87+
text: >
88+
*Triggered by:* `${{ github.actor }}`
89+
\n*Workflow:* <${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }}|View Details>
90+
- type: divider
91+
- type: section
92+
fields:
93+
- type: mrkdwn
94+
text: "*services-e2etest:* ${{ needs.services-e2etest.result == 'success' && ':white_check_mark:' || ':x:' }}"
95+
- type: mrkdwn
96+
text: "*services-fhir-api-e2etest:* ${{ needs.services-fhir-api-e2etest.result == 'success' && ':white_check_mark:' || ':x:' }}"
97+
- type: context
98+
elements:
99+
- type: mrkdwn
100+
101+
102+
103+
78104

0 commit comments

Comments
 (0)