Add stack outputs section to GitHub Actions CI/CD guide#17957
Add stack outputs section to GitHub Actions CI/CD guide#17957
Conversation
Add documentation on how to access Pulumi stack outputs in GitHub Actions workflows. Covers two approaches: - Using the pulumi/actions GitHub Action's built-in step output mechanism, where each stack output is available as a named step output via steps.<id>.outputs.<output-name> - Using the Pulumi CLI directly with `pulumi stack output` and the $GITHUB_OUTPUT mechanism for passing values between steps Includes language-specific code examples showing how to export stack outputs, a complete workflow YAML example, and a warning about handling sensitive output values. Closes #10175
Docs ReviewScope: Reviewed the added "Stack outputs" section in Overall this is a well-structured, useful addition that addresses a real community need (issue #10175). The content is accurate, clearly organized into two approaches (action vs CLI), and includes appropriate language-specific examples. A few items to consider: Issues
Minor / optional
What looks good
Mention me ( |
|
Your site preview for commit 827cabb is ready! 🎉 http://www-testing-pulumi-docs-origin-pr-17957-827cabbf.s3-website.us-west-2.amazonaws.com. |
- Remove unused import from TypeScript example - Add backticks to pulumi/actions heading - Add fromJSON() usage example to the JSON outputs snippet - Reword intro sentence for readability
|
Thanks for the detailed review! I've addressed all the feedback in 59211e2:
|
|
Your site preview for commit 59211e2 is ready! 🎉 http://www-testing-pulumi-docs-origin-pr-17957-59211e2b.s3-website.us-west-2.amazonaws.com. |
Closes #10175
What this PR does
Adds a new "Stack outputs" section to the GitHub Actions CI/CD guide, documenting how to access Pulumi stack outputs in downstream workflow steps. This has been a recurring community request—the issue was opened in October 2023 based on feedback from July 2023.
Changes
Adds a new top-level section between "Pull Request Flow" and "Configuration" covering two approaches:
Using the
pulumi/actionsaction: The action already exposes each stack output as a named step output via GitHub Actions'steps.<id>.outputs.<output-name>mechanism. The new section documents this with a working YAML workflow example and language-specific snippets (TypeScript, Python, Go, C#) showing how to export the output from Pulumi code.Using the Pulumi CLI directly: For cases where the
pulumi/actionsaction is not used for a given step, documents how to capturepulumi stack output <key>andpulumi stack output --jsoninto$GITHUB_OUTPUTand use the result in subsequent steps.The section also includes a warning callout about sensitive output values, pointing readers to
suppress-outputs: trueand GitHub Encrypted Secrets.Testing
Markdown lint passed (0 errors across 1736 files).
🧠 This PR was created by minime on behalf of @joeduffy.