Add Account ID. #6
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: IaC Diff | |
on: | |
push: | |
branches: | |
- '*' | |
jobs: | |
deploy: | |
name: Deploy CDK stacks to test | |
runs-on: ubuntu-latest | |
permissions: | |
actions: write | |
contents: read | |
id-token: write | |
steps: | |
- | |
name: Configure AWS credentials | |
uses: aws-actions/configure-aws-credentials@v1 | |
with: | |
role-to-assume: ${{vars.GHA_AWS_DEPLOY_ROLE}} | |
aws-region: eu-west-2 | |
- | |
name: Get AWS Account Id | |
id: aws-sts | |
run: echo "acct_id=$(aws sts get-caller-identity --query 'Account')" >> $GITHUB_OUTPUT | |
- | |
name: Checkout repo | |
uses: actions/checkout@v2 | |
- | |
name: Install dependencies | |
run: cd iac/ && npm install | |
- | |
name: CDK synth | |
env: | |
CDK_DEFAULT_ACCOUNT: ${{ steps.aws-sts.outputs.acct_id }} | |
run: cd iac/ && node_modules/aws-cdk/bin/cdk diff |