GitHub Action
Run aws-cdk
v4.2.0
Latest version
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
(CREATE | UPDATE | DELETE)_IN_PROGRESS
before running new deployments.
...
steps:
- uses: actions/checkout@v4
...
- name: Install dependencies
...
- name: cdk bootstrap
uses: tj-actions/aws-cdk@v4
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@v4
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@v4
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@v4
with:
cdk_subcommand: "deploy"
cdk_stack: "stack1"
cdk_extra_args: >-
--progress events
--require-approval never
--parameters environment=${{ secrets.ENVIRONMENT }}
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.
Thanks goes to these wonderful people (emoji key):
Raphael Boidol 📖 |
This project follows the all-contributors specification. Contributions of any kind welcome!