forked from aws-observability/aws-otel-test-framework
-
Notifications
You must be signed in to change notification settings - Fork 0
49 lines (46 loc) · 1.31 KB
/
cdk-deploy.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
name: Deploy cdk infra
on:
workflow_dispatch:
push:
branches: ['terraform']
# List of paths that should be considered when triggering the workflow
paths: ['cdk_infra/**']
permissions:
id-token: write
contents: read
concurrency:
group: cdk_infra_deploy
cancel-in-progress: false
jobs:
run-cdk-deploy:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Configure AWS Credentials
uses: aws-actions/configure-aws-credentials@v2
with:
role-to-assume: ${{ secrets.TEST_FW_ASSUMABLE_ROLE_ARN }}
aws-region: us-west-2
role-duration-seconds: 21600
- uses: actions/setup-node@v3
with:
node-version: 16
- name: Get npm cache directory
id: npm-cache-dir
run: |
echo "dir=$(npm config get cache)" >> $GITHUB_OUTPUT
- uses: actions/cache@v3
id: npm-cache
with:
path: ${{ steps.npm-cache-dir.outputs.dir }}
key: ${{ runner.os }}-node-${{ hashFiles('**/package-lock.json') }}
restore-keys: |
${{ runner.os }}-node-
- name: npm install
working-directory: cdk_infra
run: |
npm install
- name: run cdk deploy
working-directory: cdk_infra
run: |
make deploy-infra