Skip to content

Commit 63c6333

Browse files
committed
Add aws credentials for sending metrics to Cloudwatch
1 parent 2283bc7 commit 63c6333

File tree

2 files changed

+12
-2
lines changed

2 files changed

+12
-2
lines changed

.github/workflows/browser-compatibility-test-previous-major-version.yml

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -311,10 +311,15 @@ jobs:
311311
run: npm install axios
312312
- name: Send Slack Message
313313
run: node .github/script/send-test-report.js ${{ secrets.SLACK_JS_SDK_DEV_CORE_PREV_VER_WEBHOOK }} ${{ env.WORKFLOW_URL}} ${{ env.WORKFLOW_JOBS_STATUS }}
314+
- name: Configure AWS Credentials
315+
uses: aws-actions/configure-aws-credentials@v2
316+
with:
317+
role-to-assume: ${{ secrets.AWS_ROLE_TO_ASSUME_SDK_DEV }}
318+
aws-region: us-east-1
314319
- name: Send Metric to CloudWatch
315-
if: always()
316320
run: |
317321
node -e "
322+
npm install @aws-sdk/client-cloudwatch
318323
const { CloudWatchClient, PutMetricDataCommand } = require('@aws-sdk/client-cloudwatch');
319324
const client = new CloudWatchClient({ region: process.env.REGION });
320325

.github/workflows/browser-compatibility-test.yml

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -284,10 +284,15 @@ jobs:
284284
run: npm install axios
285285
- name: Send Slack Message
286286
run: node .github/script/send-test-report.js ${{ secrets.SLACK_JS_SDK_DEV_CORE_WEBHOOK }} ${{ env.WORKFLOW_URL}} ${{ env.WORKFLOW_JOBS_STATUS }}
287+
- name: Configure AWS Credentials
288+
uses: aws-actions/configure-aws-credentials@v2
289+
with:
290+
role-to-assume: ${{ secrets.AWS_ROLE_TO_ASSUME_SDK_DEV }}
291+
aws-region: us-east-1
287292
- name: Send Metric to CloudWatch
288-
if: always()
289293
run: |
290294
node -e "
295+
npm install @aws-sdk/client-cloudwatch
291296
const { CloudWatchClient, PutMetricDataCommand } = require('@aws-sdk/client-cloudwatch');
292297
const client = new CloudWatchClient({ region: process.env.REGION });
293298

0 commit comments

Comments
 (0)