Skip to content

Commit 4609936

Browse files
authored
CI perf workflow: fix the deploy step.. take two (@W-19345469@) (#3115)
* CI perf workflow: fix the deploy step Override the location of the .mobify credential file * More robust fix * Refactor the flags * Add whitespace * Update credentials * Add Slack notification
1 parent ffa67e4 commit 4609936

File tree

1 file changed

+31
-2
lines changed

1 file changed

+31
-2
lines changed

.github/workflows/performance-metrics.yml

Lines changed: 31 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -34,8 +34,8 @@ jobs:
3434
- name: Create MRT credentials file
3535
uses: './.github/actions/create_mrt'
3636
with:
37-
mobify_user: ${{ secrets.MOBIFY_STG_CLIENT_USER }}
38-
mobify_api_key: ${{ secrets.MOBIFY_STG_CLIENT_API_KEY }}
37+
mobify_user: ${{ secrets.MRT_STG_Q4_PWA_PERF_API_USER }}
38+
mobify_api_key: ${{ secrets.MRT_STG_Q4_PWA_PERF_API_KEY }}
3939

4040
- name: Push Bundle to MRT
4141
uses: './.github/actions/push_to_mrt'
@@ -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)