Skip to content
This repository was archived by the owner on Apr 30, 2023. It is now read-only.

actions_comment not working with cdk diff #45

@mettke

Description

@mettke

Hey, thank you for creating this github action, it really helps us with our deployment flow. We are, however, not able to get the actions_comment flag to work, would you mind helping us with it?

In our yaml file we are setting the permissions:

permissions:
  contents: write
  pull-requests: write

And then we use the following (AWS credentials are available via env variables):

      - name: CDK diff
        uses: youyo/aws-cdk-github-actions@v2
        with:
          cdk_subcommand: 'diff'
          cdk_stack: 'stackname-*'
          working_dir: './infra'
          actions_comment: true

This creates a diff for the two stacks we have and prints out the differences (the first one has differences, the second ones doesn't), but no message is written to the PR. Could it be that it works only with one stack at a time?

Stack stack-name-1
IAM Statement Changes
[...]
Resources
[+] AWS::Events::Rule [..]

Stack stack-name-2
There were no differences

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