-
Notifications
You must be signed in to change notification settings - Fork 0
42 lines (39 loc) · 1.15 KB
/
deploy-app.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
name: Deploy App
on: workflow_dispatch
env:
CARGO_TERM_COLOR: always
jobs:
deploy-app:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/setup-node@v3
- id: commit
uses: pr-mpt/actions-commit-hash@v2
- name: Install CDKTF CLI
run: yarn global add cdktf-cli
- name: Install Terraform
uses: hashicorp/setup-terraform@v2
with:
terraform_version: 1.7.2
terraform_wrapper: false
- name: Set up cdktf cache
uses: actions/cache@v3
continue-on-error: false
with:
path: |
infra/node_modules/
infra/.gen/
infra/cdktf.out/
key: ${{ runner.os }}-cdktf-${{ hashFiles('infra/**/yarn.lock', '**/constraints.json') }}
- name: Deploy App
working-directory: infra
run: |
yarn install --frozen-lockfile --prefer-offline
terraform version -json
cdktf get
cdktf deploy ecr infra --auto-approve
env:
AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }}
AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
COMMIT_SHA: ${{ steps.commit.outputs.short }}