feat: use GitHub Actions environments in generated CI/CD workflows#298
Conversation
…env-specific secret suffixes Agent-Logs-Url: https://github.com/adobe/generator-aio-app/sessions/5c564e07-721c-4072-a36f-abf0b7660de8 Co-authored-by: shazron <[email protected]>
There was a problem hiding this comment.
🤖 PR Reviewer
This diff refactors GitHub Actions workflows to use GitHub Environments (production/stage) with environment-scoped secrets instead of environment-suffixed secret names. The approach is valid and leverages GitHub's built-in environment protection rules. Tests are updated accordingly and cover the key changes well.
✅ LGTM! This PR looks good to merge.
💡 How to re-trigger
Comment /review or /pr-reviewer on this PR
Codecov Report✅ All modified and coverable lines are covered by tests. 📢 Thoughts on this report? Let us know! |
Agent-Logs-Url: https://github.com/adobe/generator-aio-app/sessions/457aa7d0-3909-4ccc-a867-5b493735cacd Co-authored-by: shazron <[email protected]>
There was a problem hiding this comment.
🤖 PR Reviewer
This diff refactors GitHub Actions workflows to use environment-scoped secrets via GitHub Environments (production/stage) instead of environment-suffixed secret names. The change is clean, well-tested, and follows GitHub best practices for environment-specific secrets. The addition of environment protection rules is a security improvement as it enables required reviewers and deployment gates.
✅ LGTM! This PR looks good to merge.
💡 How to re-trigger
Comment /review or /pr-reviewer on this PR
Fixes #297
Generated CI/CD workflows used environment-specific secret name suffixes (
_PROD,_STAGE) to differentiate credentials. This approach should be replaced with GitHub Actions environments, which scope secrets natively per environment.Changes
deploy_prod.yml— addedenvironment: productionto the deploy job; stripped_PRODsuffix from all secretsdeploy_stage.yml— addedenvironment: stageto the deploy job; stripped_STAGEsuffix from all secretspr_test.yml— addedenvironment: stageto the test job; stripped_STAGEsuffix from all secretsBefore / After
Secrets with identical names are now configured once per GitHub Actions environment (
production/stage) rather than duplicated under different names in the same repository secret store.