update repo #28
Workflow file for this run
This file contains hidden or 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
| 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 | |
| - uses: pnpm/action-setup@v4 | |
| name: Install pnpm | |
| with: | |
| version: 10 | |
| run_install: false | |
| - name: Setup Node.js | |
| uses: actions/setup-node@v4 | |
| with: | |
| node-version: 24 | |
| cache: 'pnpm' | |
| - 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: | | |
| pnpm install --frozen-lockfile | |
| echo "check the diff to main" | |
| BRANCH_NAME=main pnpm exec 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 | |