-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #17 from thakurrishabh/dev
testing dlq and dlq as source to lambda
- Loading branch information
Showing
4 changed files
with
64 additions
and
17 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -37,20 +37,51 @@ jobs: | |
|
||
- name: "Run cdk synth" | ||
id: synth | ||
run: cdk synth --json EventBridgeAwsCdkStack | grep Type 2>&1 | tee cdk.log | ||
|
||
- name: Add synth comment to PR | ||
env: | ||
URL: ${{ github.event.pull_request.comments_url }} | ||
GITHUB_TOKEN: ${{ secrets.GIT_PAT }} | ||
run: | | ||
cdk synth --output=./templates | ||
echo "##[set-output name=stdoutplan;]$(cat ./templates/EventBridgeAwsCdkStack.template.json)" | ||
jq --raw-input --slurp '{body: .}' cdk.log > cdk.json | ||
curl \ | ||
-H "Content-Type: application/json" \ | ||
-H "Authorization: token $GITHUB_TOKEN" \ | ||
-d @cdk.json \ | ||
-X POST \ | ||
$URL | ||
- name: Run CDK diff | ||
run: cdk diff -c aws-cdk:enableDiffNoFail=true --no-color --app cdk.out "*" 2>&1 | tee cdk1.log | ||
|
||
- name: "Run - CDK synth Comment" | ||
uses: actions/[email protected] | ||
- name: Add diff comment to PR | ||
env: | ||
STDOUT: "```${{ steps.synth.outputs.stdoutplan }}```" | ||
with: | ||
github-token: ${{ secrets.GIT_PAT }} | ||
script: | | ||
github.issues.createComment({ | ||
issue_number: context.issue.number, | ||
owner: context.repo.owner, | ||
repo: context.repo.repo, | ||
body: process.env.STDOUT | ||
}) | ||
URL: ${{ github.event.pull_request.comments_url }} | ||
GITHUB_TOKEN: ${{ secrets.GIT_PAT }} | ||
run: | | ||
jq --raw-input --slurp '{body: .}' cdk1.log > cdk1.json | ||
curl \ | ||
-H "Content-Type: application/json" \ | ||
-H "Authorization: token $GITHUB_TOKEN" \ | ||
-d @cdk1.json \ | ||
-X POST \ | ||
$URL | ||
# run: | | ||
# cdk synth --output=./templates | ||
# echo "##[set-output name=stdoutplan;]$(<./templates/EventBridgeAwsCdkStack.template.json)" | ||
# | ||
# - name: "Run - CDK synth Comment" | ||
# uses: actions/[email protected] | ||
# env: | ||
# STDOUT: "```${{ steps.synth.outputs.stdoutplan }}```" | ||
# with: | ||
# github-token: ${{ secrets.GIT_PAT }} | ||
# script: | | ||
# github.issues.createComment({ | ||
# issue_number: context.issue.number, | ||
# owner: context.repo.owner, | ||
# repo: context.repo.repo, | ||
# body: process.env.STDOUT | ||
# }) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters