cdk-diff-action icon indicating copy to clipboard operation
cdk-diff-action copied to clipboard

Add support for multiple diffs

Open rantoniuk opened this issue 7 months ago • 3 comments

When having environment-agnostic stacks and hence using only CDK's DefaultStage, currently there is no way to have multiple diffs in the same workflow:

jobs:

 dev:
    name: CDK diff DEV
    runs-on: ubuntu-latest

    environment:
      name: dev

    steps:
      ...

      - name: CDK diff
        uses: corymhall/cdk-diff-action@v2-beta
        with:
          githubToken: ${{ steps.ghactions-auth.outputs.token }}
          cdkOutDir: ${{ github.workspace }}/cdk.out
          failOnDestructiveChanges: false

 prod:
    name: CDK diff PROD
    runs-on: ubuntu-latest

    environment:
      name: prod

    steps:
      ...

      - name: CDK diff
        uses: corymhall/cdk-diff-action@v2-beta
        with:
          githubToken: ${{ steps.ghactions-auth.outputs.token }}
          cdkOutDir: ${{ github.workspace }}/cdk.out
          failOnDestructiveChanges: false

What I expect here is those two jobs create two distinct comments, based on the environment used. Right now, the action is overwriting the comment content depending on the order of finish.

rantoniuk avatar May 05 '25 13:05 rantoniuk