Skip to content

Display Infrastructure Template #1

Display Infrastructure Template

Display Infrastructure Template #1

name: Display Infrastructure Template
on:
workflow_dispatch:
jobs:
synth:
name: Synthesize Cloudformation with AWS CDK
runs-on: ubuntu-latest
# These permissions are needed to interact with GitHub's OIDC Token endpoint.
permissions:
id-token: write
contents: read
if: ${{ startsWith(vars.ROLE_ARN, 'arn:aws:iam') }}
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Configure AWS credentials from Test account
uses: aws-actions/configure-aws-credentials@v4
with:
role-to-assume: ${{ vars.ROLE_ARN }}
aws-region: us-east-1
- name: Install dependencies
run: npm ci --legacy-peer-deps
- name: Synthesize Cloudformation
run: CDK_DEFAULT_ACCOUNT=${{ vars.CDK_DEFAULT_ACCOUNT }} CDK_DEFAULT_REGION=${{ vars.CDK_DEFAULT_REGION }} EMAIL_SENDER=${{ vars.EMAIL_SENDER }} ADMIN_EMAIL=${{ vars.ADMIN_EMAIL }} BASE_DOMAIN=${{ vars.BASE_DOMAIN }} npx cdk synth