You're viewing an older version of this GitHub Action. Do you want to see the latest version instead?
GitHub Action
Run aws-cdk
v4.0.0
Run aws cdk commands.
- Run aws-cdk with support for downloading the package or running a pre-installed version. (Note: This requires passing the correct value for the
working_dir
input). - Waits for pending stack
UPDATE_COMPLETE
before running new deployments.
...
steps:
- uses: actions/checkout@v3
...
- name: Install dependencies
...
- name: cdk bootstrap
uses: tj-actions/aws-cdk@v3
with:
cdk_subcommand: "bootstrap"
cdk_stack: "stack1"
env:
AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }}
AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
AWS_DEFAULT_REGION: "us-east-1"
- name: cdk diff
uses: tj-actions/aws-cdk@v3
with:
cdk_subcommand: "diff"
cdk_stack: "stack1"
env:
AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }}
AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
AWS_DEFAULT_REGION: "us-east-1"
- name: cdk synth
uses: tj-actions/aws-cdk@v3
with:
cdk_subcommand: "synth"
cdk_stack: "stack1"
env:
AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }}
AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
AWS_DEFAULT_REGION: "us-east-1"
- name: cdk deploy
uses: tj-actions/aws-cdk@v3
with:
cdk_subcommand: "deploy"
cdk_stack: "stack1"
cdk_extra_args: "--require-approval never"
env:
AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }}
AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
AWS_DEFAULT_REGION: "us-east-1"
INPUT | TYPE | REQUIRED | DEFAULT | DESCRIPTION |
---|---|---|---|---|
cdk_extra_args | string | false | AWS CDK subcommand arguments. | |
cdk_stack | string | false | "*" |
AWS CDK stack name to execute. |
cdk_subcommand | string | true | AWS CDK subcommand to execute. | |
cdk_version | string | false | "latest" |
AWS CDK version to install. |
working_dir | string | false | "." |
Working directory. |
- Free software: MIT license
If you feel generous and want to show some extra appreciation:
This package was created with Cookiecutter using cookiecutter-action
Report bugs at https://github.com/tj-actions/aws-cdk/issues.
If you are reporting a bug, please include:
- Your operating system name and version.
- Any details about your workflow that might be helpful in troubleshooting.
- Detailed steps to reproduce the bug.