From 73a449f804fab3e133c737c7ed353086e7ec8aaa Mon Sep 17 00:00:00 2001 From: Alex Newman Date: Fri, 1 Mar 2024 08:16:11 -0400 Subject: [PATCH] add workflow --- .github/workflows/cdp.yml | 39 +++++++++++++++++++++++++++++++++++++++ 1 file changed, 39 insertions(+) create mode 100644 .github/workflows/cdp.yml diff --git a/.github/workflows/cdp.yml b/.github/workflows/cdp.yml new file mode 100644 index 0000000..5db2124 --- /dev/null +++ b/.github/workflows/cdp.yml @@ -0,0 +1,39 @@ +on: [push] + +jobs: + aws_cdk: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v3 + - name: cdk diff + uses: youyo/aws-cdk-github-actions@v2 + with: + cdk_subcommand: 'diff' + actions_comment: true + 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: youyo/aws-cdk-github-actions@v2 + with: + cdk_subcommand: 'deploy' + cdk_stack: 'stack1' + cdk_args: '--require-approval never' + actions_comment: false + 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: youyo/aws-cdk-github-actions@v2 + with: + cdk_subcommand: 'synth' + cdk_version: '1.16.2' + working_dir: 'src' + 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'