-
Notifications
You must be signed in to change notification settings - Fork 0
56 lines (46 loc) · 1.31 KB
/
create-pipeline.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
name: Deploy and Trigger Pipeline
on:
push:
branches:
- master
jobs:
deploy:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v2
- name: Set up Node.js
uses: actions/setup-node@v2
with:
node-version: '14'
- name: Configure AWS credentials
uses: aws-actions/configure-aws-credentials@v1
with:
aws-access-key-id: ${{ secrets.ZENITSU_ACCESS_KEY_ID }}
aws-secret-access-key: ${{ secrets.ZENITSU_SECRET_KEY }}
aws-region: 'eu-central-1'
- name: Assume IAM Role
id: assume-role
uses: aws-actions/configure-aws-credentials@v1
with:
role-to-assume: arn:aws:iam::381492264897:role/lambda_role
role-duration-seconds: 3600
aws-region: eu-central-1
env:
AWS_DEFAULT_OUTPUT: json
- name: Install CDK dependencies
run: npm install -g aws-cdk
- name: Synthesize CDK app
run: |
cd infrastructure
npm ci
npm run build
npx cdk synth
- name: Show CDK diff
run: |
cd infrastructure
npx cdk diff
- name: Deploy CDK stack
run: |
cd infrastructure
npx cdk deploy --require-approval never