Skip to content

No comments posted in the PR #6

@guikcd

Description

@guikcd

Hello,

I use the version 0.2.0 and don't have a comment with diff on the corresponding PR/branch in a private repository. Here is my action setup:

---
name: cdk diff
on:
  push:
    branches-ignore:
      - 'main'
jobs:

  build-deploy:
    runs-on: ubuntu-latest
    permissions:
      id-token: write
      contents: read
    strategy:
      matrix:
        python-version: [3.11]
        node-version: [20]

    steps:
      - name: checkout source code
        uses: actions/checkout@v4

      - name: Configure AWS credentials
        uses: aws-actions/configure-aws-credentials@v4
        with:
          role-to-assume: ${{secrets.AWS_ROLE_TO_ASSUME}}
          aws-region: ${{secrets.AWS_REGION}}

      - name: Setup Python
        uses: actions/setup-python@v5
        with:
          python-version: ${{matrix.python-version}}

      - name: Set up Node
        uses: actions/setup-node@v4
        with:
          node-version: ${{matrix.node-version}}

      - name: Install Python deps
        run: |
          npm install -g aws-cdk
          pip install --requirement=requirements.txt

      - name: CDK synth
        run: cdk synth
        env:
          SKIP_SANDBOX: true

      - uses: daveved/cdk-diff-action@v0.2.0
        with:
          repo-token: ${{ secrets.GITHUB_TOKEN }}

I have 4 stacks in this repository, simulated a change in a parameter and noticed the change in the build action log:

[...]
Resources
[~] AWS::S3::Bucket CloudTrailBucket CloudTrailBucket98B0BFE1 
 └─ [~] LifecycleConfiguration
     └─ [~] .Rules:
         └─ @@ -1,6 +1,6 @@
            [ ] [
            [ ]   {
            [-]     "ExpirationInDays": 180,
            [+]     "ExpirationInDays": 181,
            [ ]     "Status": "Enabled"
            [ ]   }
            [ ] ]
[...]
✨  Number of stacks with differences: 2
[...]

How can I enable the resource diff in the PR as comment?
Thank you.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions