-
Notifications
You must be signed in to change notification settings - Fork 0
62 lines (49 loc) · 1.83 KB
/
main.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
50
51
52
53
54
55
56
57
58
59
60
61
62
name: Deploy AWS CDK
# Controls when the action will run.
on:
push:
branches: [ main ]
#pull_request:
#branches: [ main ]
# Allows you to run this workflow manually from the Actions tab
workflow_dispatch:
jobs:
aws_cdk:
runs-on: ubuntu-latest
environment: dev
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Configure AWS Credentials
uses: aws-actions/configure-aws-credentials@v4
with:
aws-access-key-id: ${{ secrets.AWS_ACCESS_KEY_ID }}
aws-secret-access-key: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
aws-region: us-east-1
role-to-assume: arn:aws:iam::533267413906:role/GithubRoleAdmin
role-session-name: samplerolesession
- name: install npm
run: 'sudo apt update -y && sudo apt install nodejs npm -y'
- name: Install AWS CDK
run: 'sudo npm install -g aws-cdk'
- name: Install Requirements
run: 'pip3 install -r requirements.txt'
working-directory: .
- name: Install Requirements for lf1
run: 'pip install -r ./lambdas/ImageInquiry-lf1-frmCDK/requirements.txt --target=./layers/lf1-local-packages/python/lib/python3.11/site-packages'
working-directory: .
- name: Install Requirements for lf2
run: 'pip install -r ./lambdas/ImageInquiry-lf2-frmCDK/requirements.txt --target=./layers/lf2-local-packages/python/lib/python3.11/site-packages'
working-directory: .
- name: CDK Synth
run: cdk synth
working-directory: .
- name: CDK bootstrap
run: cdk bootstrap
working-directory: .
- name: CDK Deploy
run: cdk deploy --require-approval never
working-directory: .
# - name: CDK Destroy
# run: cdk destroy --force
# working-directory: .