Skip to content

Commit 615e0d6

Browse files
committed
Add Slack notification
1 parent 99e90ed commit 615e0d6

File tree

1 file changed

+29
-0
lines changed

1 file changed

+29
-0
lines changed

.github/workflows/performance-metrics.yml

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -45,3 +45,32 @@ jobs:
4545
TARGET: production
4646
CLOUD_ORIGIN: ${{ vars.MRT_STG_CLOUD_ORIGIN }}
4747
FLAGS: --wait
48+
49+
notify-slack:
50+
needs: [run-performance-metrics]
51+
if: ${{ always() }}
52+
runs-on: ubuntu-latest
53+
steps:
54+
- name: Send GitHub Action data to Slack workflow (Performance Metrics Success)
55+
id: slack-success
56+
if: ${{ github.event_name == 'schedule' && needs.run-performance-metrics.result == 'success' }}
57+
uses: slackapi/slack-github-action@v1.23.0
58+
with:
59+
payload: |
60+
{
61+
"message": "✅ Performance metrics workflow: successfully deployed bundle for performance testing."
62+
}
63+
env:
64+
SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK_URL }}
65+
66+
- name: Send GitHub Action data to Slack workflow (Performance Metrics Failure)
67+
id: slack-failure
68+
if: ${{ github.event_name == 'schedule' && needs.run-performance-metrics.result != 'success' }}
69+
uses: slackapi/slack-github-action@v1.23.0
70+
with:
71+
payload: |
72+
{
73+
"message": "❌ Performance metrics workflow: please check the logs for details. (${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }})"
74+
}
75+
env:
76+
SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK_URL }}

0 commit comments

Comments
 (0)