Skip to content

Add support for multiple diffs #130

@rantoniuk

Description

@rantoniuk

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.

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