Skip to content

development-and-dinosaurs/github-actions-aws-cdk

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

 

History

22 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

GitHub Actions AWS CDK

GitHub Action for running the AWS CDK using the JVM.

This action runs commands using the AWS CDK, optimised for JVM languages.

See the AWS CDK documentation for full information on requirements and prerequisites for using the AWS CDK in your AWS account.

Supported Technologies

  • Java

Additional technologies can be added as required. Raise an issue.

Inputs

Input Description Required Default
command CDK command to execute true n/a
stacks Stacks to execute the command against true n/a
working_directory Directory to execute CDK commands from false .

Outputs

None.

Need an output in your workflow? Raise an issue.

Credentials

The AWS CDK requires credentials to perform actions. You must use a separate action to configure AWS credentials and make them available to this action via environment variables.

We recommend using the "Configure AWS Credentials" Action for GitHub Actions for handling credentials, as this supplies numerous secure ways of accessing credentials, and automatically makes them available for this action to use.

Examples

Action

- name: ☁️ Deploy CDK
  uses: development-and-dinosaurs/github-actions-aws-cdk@v1
  with:
    command: deploy
    stacks: MyApplication
    working_directory: path/to/my/infrastructure/app

Full Workflow

name: 🚀 Deploy CDK App

on:
  push:
    branches:
      - main

permissions:
  id-token: write
  contents: read

jobs:
  deploy:
    name: 🚀 Deploy Application
    runs-on: ubuntu-latest
    steps:
      - name: 🛒 Checkout code
        uses: actions/checkout@v4
      - name: 🔑 Configure AWS Credentials
        uses: aws-actions/configure-aws-credentials@v4
        with:
          role-to-assume: arn:aws:iam::123456789:role/my-cdk-deploy-role
      - name: ☁️ Deploy CDK
        uses: development-and-dinosaurs/github-actions-aws-cdk@v1
        with:
          command: deploy
          stacks: MyApplication
          working_directory: path/to/my/infrastructure/app

About

GitHub Action for running the AWS CDK

Topics

Resources

License

Stars

Watchers

Forks

Packages

No packages published