-
Notifications
You must be signed in to change notification settings - Fork 0
75 lines (66 loc) · 2.31 KB
/
infrastructure.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
63
64
65
66
67
68
69
70
71
72
73
74
75
# .github/workflows/infrastructure.yml
name: Infrastructure Deployment
on:
push:
paths:
- "apps/cdk/**"
- "apps/backend/**"
- "apps/kredential-rpc/**"
branches:
- master
workflow_dispatch:
concurrency:
group: ${{ github.workflow }}-cdk
jobs:
cdk-deploy:
environment: Production
permissions:
id-token: write
contents: read
runs-on: ubuntu-latest
timeout-minutes: 30
steps:
- name: Print environment variables
run: |
echo "STAGE: ${{ vars.SAGE }}"
- name: Setup pnpm
uses: pnpm/action-setup@v4
with:
version: "latest"
- name: Check out Git repository
uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: 20
cache: pnpm
- name: Configure AWS credentials
uses: aws-actions/configure-aws-credentials@v2
with:
role-to-assume: ${{ vars.AWS_ROLE_TO_ASSUME }}
aws-region: ${{ vars.AWS_REGION }}
- name: Install dependencies
run: pnpm install
- name: Run cdk deploy
env:
STAGE: ${{ vars.STAGE }}
ISSUER_PRIVATE_KEY_ID: ${{ secrets.ISSUER_PRIVATE_KEY_ID }}
ISSUER_PRIVATE_KEY_JWK: ${{ secrets.ISSUER_PRIVATE_KEY_JWK }}
ISSUER_PUBLIC_KEY_JWK: ${{ secrets.ISSUER_PUBLIC_KEY_JWK }}
AWS_ACCOUNT: ${{ secrets.AWS_ACCOUNT }}
AWS_PUBLIC_HOSTED_ZONE_ID: ${{ secrets.AWS_PUBLIC_HOSTED_ZONE_ID }}
AWS_PUBLIC_HOSTED_ZONE_NAME: ${{ secrets.AWS_PUBLIC_HOSTED_ZONE_NAME }}
ISSUER_DID: ${{ vars.ISSUER_DID }}
KM_DB_NAME: ${{ vars.KM_DB_NAME }}
KM_DB_SCHEMA: ${{ vars.KM_DB_SCHEMA }}
KC_DB_NAME: ${{ vars.KC_DB_NAME }}
KC_DB_SCHEMA: ${{ vars.KC_DB_SCHEMA }}
KC_ADMIN_USERNAME: ${{ vars.KC_ADMIN_USERNAME }}
KC_ADMIN_PASSWORD: ${{ vars.KC_ADMIN_PASSWORD }}
KM_DB_PORT: ${{ vars.KM_DB_PORT }}
KC_DB_PORT: ${{ vars.KC_DB_PORT }}
KC_VERSION: ${{ vars.KC_VERSION }}
KC_PORT: ${{ vars.KC_PORT }}
KC_REALM_NAME: ${{ vars.KC_REALM_NAME }}
KC_CLIENT_ID: ${{ vars.KC_CLIENT_ID }}
KC_REALM_PUBLIC_KEY: ${{ secrets.KC_REALM_PUBLIC_KEY }}
run: cd apps/cdk && pnpm run cdk deploy --all --require-approval never