Skip to content

add tags as properties #23

add tags as properties

add tags as properties #23

Workflow file for this run

name: cdk-diff
on:
pull_request: {}
# on:
# push:
# branches:
# - feature/*
env:
AWS_DEFAULT_REGION: us-east-1
BRANCH_NAME: ${{ github.head_ref || github.ref_name }}
GITHUB_OWNER: ${{ github.repository_owner }}
GITHUB_REPO: $(echo ${{ github.repository }} | cut -d'/' -f2)
PULL_REQUEST_ID: ${{ github.event.pull_request.number }}
jobs:
deploy:
name: check diff to main
runs-on: ubuntu-latest
permissions:
id-token: write
contents: write
pull-requests: write
repository-projects: write
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Configure AWS credentials
uses: aws-actions/configure-aws-credentials@v4
with:
role-to-assume: arn:aws:iam::${{ secrets.AWS_ACCOUNT }}:role/GitHubActionRoleJohannesKonings
aws-region: ${{ env.AWS_DEFAULT_REGION }}
- name: Check caller identity
run: |
aws sts get-caller-identity
- name: Install cdk-notifier
run: |
curl -L "https://github.com/karlderkaefer/cdk-notifier/releases/latest/download/cdk-notifier_$(uname)_amd64.gz" -o cdk-notifier.gz
gunzip cdk-notifier.gz && chmod +x cdk-notifier && rm -rf cdk-notifier.gz
sudo mv cdk-notifier /usr/local/bin/cdk-notifier
cdk-notifier --version
- name: Check diff to main
run: |
npm ci
echo "check the diff to main"
BRANCH_NAME=main npx cdk diff --progress=events &> >(tee cdk.log)
echo "create cdk-notifier report"
echo "BRANCH_NAME: $BRANCH_NAME"
echo "GITHUB_OWNER: $GITHUB_OWNER"
echo "GITHUB_REPO: $GITHUB_REPO"
cdk-notifier \
--owner ${{ env.GITHUB_OWNER }} \
--repo ${{ env.GITHUB_REPO }} \
--token ${{ secrets.GITHUB_TOKEN }} \
--log-file ./cdk.log \
--tag-id diff-to-main \
--pull-request-id ${{ env.PULL_REQUEST_ID }} \
--vcs github \
--ci circleci \
--template extendedWithResources