I am running a pulumi project in an NX monorepo , ...
# general
m
I am running a pulumi project in an NX monorepo , and i have a GH workflow thats using
pulumi/actions@v4
to run a preview command . Currently this workflow runs regardless of whether the pulumi project or it's dependencies were changed or not , what i would like to do is run a custom command from
nx
instead of specifying a command supported by the action currently , i would like to replace:
Copy code
with:
    command: preview
with :
Copy code
with:
    command: npx nx affected -t deploy
is there a way i can do this using pulumi/actions@v4 ? i realize i can probably do this by skipping command option all together and specifying running the nx command after pulumi actions is ran , but i was wondering if there is a way to do this with pulumi/actions ?
p
what about listing the affected packages with a tag like pulumi and then using that in an if on the pulumi step?
m
Ended up just adding a job that checks whether the expected projects are part of the output from
nx affected
and make the job that deploys pulumi to be dependant on the check.