-
-
Notifications
You must be signed in to change notification settings - Fork 13
Description
Describe the Bug
When pr-comment is set to true and Infracost is enabled (in atmos configuration and infracost-api-key is provided), the %INFRACOST_SUMMARY% and %INFRACOST_DIFF% placeholders are not replaced in the comment made in the pull request.
Note that the Infracost summary is added successfully to the GitHub action summary, so the results can still be viewed there. It is only missing from the PR comment.
From what I can tell, the PR comment is made as part of the tfcmt commands. The job step that replaces the Infracost placeholders, Set Infracost Variables, runs after the tfcmt commands, so the Infracost variables are not available in time for tfcmt. This is a bit of an interesting problem as tfcmt is also responsible for running the plan, which is required by Infracost.
Expected Behavior
The PR comment should match nearly/exactly 1:1 with the GitHub action summary. The %INFRACOST_SUMMARY% and %INFRACOST_DIFF% placeholders should be properly replaced.
Steps to Reproduce
- Ensure
integrations.github.gitops.infracost-enabledis set totruein atmos configuration. - In the workflow, ensure
infracost-api-keyis provided andpr-commentis set totrue. - Run the workflow (preferably with an expected change).
- Observe the PR comment result.
Screenshots
No response
Environment
- Version
4.3.0of this action (digest1694fc56284f79173c36922f869933c6cb1d8b72)
Additional Context
No response