Re-posting from above, does anyone know how the Pu...
# general
Re-posting from above, does anyone know how the Pulumi GitHub app is triggered? I am using GitHub actions and it only seems to get triggered on a merge and I can't seem to get it to comment on the PR. I think I am just configuring something incorrectly but can't figure out what.
Cc @colossal-beach-47527 who is the expert on this. There are docs here in case you haven’t already seen them:
thanks, I followed those to install the app but it seems like the
pulumi preview
command is not getting picked up. The docs say
Once installed in your organization, any pulumi preview or pulumi up that is run in your CI system will have its results reported back to GitHub.
But nothing is showing up on the pull request or in the Checks
That doesn’t sound right Andrew. But like Luke said, I can help track down whatever the missing link is. Just to confirm: • You are successfully running Pulumi on pushes to your pull request branch. e.g. you see the
output for the GitHub Actions run. And can visit<your-stack>/previews/… and see the preview that was performed in the GitHub Actions was persisted as you would expect on • If you click the “Checks” tab for the Pull Request, you see the Pulumi GitHub app, but it just isn’t posting any check runs? (But you are seeing the GitHub actions output on that page?)
@colossal-beach-47527 I can see the preview in the Pulumi console after I create the pull request, but the Pulumi app does not show up in the "Checks" tab. After I merge the PR, as soon as pulumi starts running the update, then the Pulumi app shows up in the 'Actions' tab.
This is the Dockerfile I am using for the action (needed to add Helm)
And this is the entrypoint script (I wanted pulumi to preview against the PR branch not the target)
This is how I am using it in GitHub actions
Hrm, that is confusing. Would you mind Direct Messaging me two things: • The URL to an update that is showing up correctly from the Pulumi GitHub app? e.g. • The URL to a preview that runs in the GitHub Actions, but isn’t flowing through to the Pulumi GitHub app. e.g.<GUID> With those two links, I can look at the metadata associated with the two updates and see why it isn’t triggering our GitHub app. When you run
pulumi up
pulumi preview
, we associate some metadata from the current environment with the update. (e.g. the current git hash at head.) That’s how we know to associate the preview/update with the PR. But it’s possible something isn’t quite the way we expect. (For example, if the git SHA that the preview is running as doesn’t match up with the GitHub pull request’s SHA or something.)
I created my own custom GitHub action, you can see it here for reference. I find it more flexible, you will probably want to fork it and change it for yourself...
Here is an example of how I use it:
Another example:
It lets you do things like this, which the other one wouldn't.
btw one bug in GitHub actions is if you need it to trigger on an automated release from say semantic, you have to use your personal GitHub token as opposed to the repo one...