This message was deleted.
# general
s
This message was deleted.
l
Your 2nd step shouldn't use the "console output" of the 1st step. Instead, it should get the outputs using Pulumi.
pulumi stack output
can do this.
That was, whether or not your first step did anything, your second step can do the right thing.
l
I'm not using console output. I'm using what pulumi emits via an [Output] attribute. That's following an example in the docs for the pulumi github action. It's been working for a year, so I'm not concerned about that. The situation I realized I'd put myself in is that if the pulumi step does not run at all (based on the conditional I had added) then there is no output for my deployment step to use. Thanks for the reply.
I think we got it working. Posting in case this helps anyone out. Using the 3rd party action to check if anything in a path changed:
Copy code
- name: Filter
      uses: dorny/paths-filter@v2
      id: filter
      with:
        filters: |
          env_changed:
            - 'Devops/azure-environment/pulumi/**'
Examining the output of that step (the "env_changed" value) to set the Pulumi action's "expect-no-changes" property:
Copy code
- name: Update the Dev Environment
      id: pulumi_up
      uses: pulumi/actions@v4
      with:
        command: up
        expect-no-changes: ${{ steps.filter.outputs.env_changed == 'false' }}
        stack-name: proj-api-dev
        work-dir: ${{ env.PULUMI_PROJECT_PATH }}
        cloud-url: "<azblob://proj-pulumi-state>"
      env:
        # required env values
FYI.