Skip to content

ScottBrenner/aws-cdk-action

Use this GitHub action with your project
Add this Action to an existing workflow or create a new one
View on Marketplace

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

GitHub Action for AWS CDK

This Action for AWS CDK enables arbitrary actions for interacting with the AWS Cloud Development Kit (AWS CDK) via the AWS CDK Toolkit (cdk command).

Currently supports CDK apps created with JavaScript, Go, Python and TypeScript.

Usage

An example workflow for synthesizing an AWS CloudFormation template for your app using cdk synth.

name: AWS CDK Synth

on: [push]

jobs:
  aws-cdk-synth:

    runs-on: ubuntu-latest

    steps:
    - name: Checkout
      uses: actions/checkout@v4

    - name: CDK Synth
      uses: scottbrenner/aws-cdk-action@v1.6.0
      with:
        args: synth
      env:
        AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }}
        AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }}

Secrets

  • AWS_ACCESS_KEY_IDRequired The AWS access key part of your credentials (more info)
  • AWS_SECRET_ACCESS_KEYRequired The AWS secret access key part of your credentials (more info)

For details on creating secrets and using them with GitHub Actions, see Creating encrypted secrets for a repository.

Environment

Each Stack instance in your AWS CDK app is explicitly or implicitly associated with an environment (env). An environment is the target AWS account and AWS Region into which this stack needs to be deployed.

See the CDK developer guide for more information.

License

The Dockerfile and associated scripts and documentation in this project are released under the MIT License.

Container images built with this project include third party materials. See THIRD_PARTY_NOTICE.md for details.