Add documentation for caching Pulumi plugins and policy packs in GitHub Actions#17224
Add documentation for caching Pulumi plugins and policy packs in GitHub Actions#17224
Conversation
…ub Actions
This adds a new section to the GitHub Actions CI/CD documentation explaining
how to use GitHub's actions/cache to cache Pulumi plugins and policy packs.
Caching these artifacts significantly improves workflow execution times by
avoiding redundant downloads on subsequent runs.
The documentation includes:
- Clear explanation of why caching is beneficial
- Proper cache paths for both plugins (~/.pulumi/plugins) and policies (~/.pulumi/policies)
- Language-specific examples for TypeScript, Python, Go, and C#
- Smart cache key strategies using dependency file hashes
- Additional guidance for advanced caching scenarios
Fixes #17026
This comment was marked as resolved.
This comment was marked as resolved.
|
Your site preview for commit 9031032 is ready! 🎉 http://www-testing-pulumi-docs-origin-pr-17224-90310326.s3-website.us-west-2.amazonaws.com. |
CamSoper
left a comment
There was a problem hiding this comment.
Thanks for adding this caching documentation! This will be really helpful for users looking to speed up their CI workflows.
I found one critical formatting issue that needs to be addressed:
Critical: Indentation Issue
The entire new section (lines 894-1095) has 4 spaces of leading indentation. This needs to be removed to prevent Hugo from misinterpreting the content.
File: content/docs/iac/guides/continuous-delivery/github-actions.md
Lines: 894-1095
The section should start flush left:
### Caching Plugins and Policy Packs
When running Pulumi in GitHub Actions, plugins and policy packs are downloaded on each workflow run.
All lines in the new section need this indentation removed.
Optional Improvements:
Active Voice (Line 897-898)
Consider changing to active voice:
GitHub Actions downloads plugins and policy packs on each workflow run. To improve CI performance and reduce workflow execution times, you can cache these artifacts using GitHub's [`actions/cache`](https://github.com/actions/cache).
Minor Simplification (Line 1088)
The cache key explanation could be slightly more concise:
The cache key includes a hash of your dependency files (e.g., `package.json`, `requirements.txt`, `go.sum`, or `.csproj`) to invalidate the cache when dependencies change and may require different plugins.
Once the indentation is fixed, this will be ready to merge!
Remove 4 leading spaces from entire section to align with document structure. Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
CamSoper
left a comment
There was a problem hiding this comment.
Applied style/formatting fixes. LGTM!
- Change to active voice: "GitHub Actions downloads" instead of "plugins and policy packs are downloaded" - Simplify cache key explanation for better readability Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
|
Your site preview for commit d3b99c1 is ready! 🎉 http://www-testing-pulumi-docs-origin-pr-17224-d3b99c11.s3-website.us-west-2.amazonaws.com. |
|
Your site preview for commit b2c7604 is ready! 🎉 http://www-testing-pulumi-docs-origin-pr-17224-b2c76043.s3-website.us-west-2.amazonaws.com. |
Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
CamSoper
left a comment
There was a problem hiding this comment.
Applied minor style/formatting fixes. LGTM!
|
Your site preview for commit b70c52f is ready! 🎉 http://www-testing-pulumi-docs-origin-pr-17224-b70c52f1.s3-website.us-west-2.amazonaws.com. |
…ub Actions (#17224) * Add documentation for caching Pulumi plugins and policy packs in GitHub Actions This adds a new section to the GitHub Actions CI/CD documentation explaining how to use GitHub's actions/cache to cache Pulumi plugins and policy packs. Caching these artifacts significantly improves workflow execution times by avoiding redundant downloads on subsequent runs. The documentation includes: - Clear explanation of why caching is beneficial - Proper cache paths for both plugins (~/.pulumi/plugins) and policies (~/.pulumi/policies) - Language-specific examples for TypeScript, Python, Go, and C# - Smart cache key strategies using dependency file hashes - Additional guidance for advanced caching scenarios Fixes #17026 * Fix markdown linting: ensure file ends with single newline * Fix indentation in Caching Plugins and Policy Packs section Remove 4 leading spaces from entire section to align with document structure. Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com> * Apply style improvements: active voice and concise phrasing - Change to active voice: "GitHub Actions downloads" instead of "plugins and policy packs are downloaded" - Simplify cache key explanation for better readability Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com> * Apply style and formatting fixes Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com> --------- Co-authored-by: Pulumi Assistant <claude@pulumi.com> Co-authored-by: Cam <cam.soper@outlook.com> Co-authored-by: Claude Sonnet 4.5 <noreply@anthropic.com>
This PR adds documentation for caching Pulumi plugins and policy packs in GitHub Actions workflows.
Changes
Added a new section "Caching Plugins and Policy Packs" to the GitHub Actions CI/CD documentation that explains:
actions/cacheto cache~/.pulumi/pluginsand~/.pulumi/policiesContext
Users running Pulumi in CI/CD environments often experience slow workflow times due to repeated plugin and policy pack downloads. This documentation provides a clear, actionable guide to implementing caching, significantly reducing workflow execution times.
The examples use dependency file hashes (e.g.,
package.json,requirements.txt,go.sum,*.csproj) in cache keys to ensure cache invalidation when dependencies change, while providing fallback cache restoration for maximum benefit.Fixes #17026