Skip to content

Commit

Permalink
add workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
posix4e committed Mar 1, 2024
1 parent 5cef17f commit 98da054
Showing 1 changed file with 46 additions and 0 deletions.
46 changes: 46 additions & 0 deletions .github/workflows/cdp.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
on: [push]

jobs:
aws_cdk:
runs-on: ubuntu-latest
steps:
- name: cdk bootstrap
uses: youyo/aws-cdk-github-actions@v2
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"

0 comments on commit 98da054

Please sign in to comment.