-
Notifications
You must be signed in to change notification settings - Fork 4
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat: add render and diff helm action #25
Conversation
…ts, using summary comments instead of full blocks, excluding empty files from diff comments
for chart in ${{ needs.get_changed_helm_charts.outputs.charts }}; do | ||
chart_diff_output=$(diff -r "shared/base-charts/${chart}" "shared/head-charts/${chart}" || true) | ||
if [ -n "$chart_diff_output" ]; then | ||
echo -e "Changes found in chart: ${chart}\n$(diff -ru shared/base-charts/${chart} shared/head-charts/${chart})\n" >> diff.log |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The unified context for diff shows the new changes with a time of the beginning of epoch. Although I am not sure how to make this any better, just a note since it could be confusing. I looked through diff man page for other alternates, but nothing comes to mind. I think for now it's fine the way it is.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We could potentially use git diff -u --no-index
instead which will not have timestamps
🎉 This PR is included in version 3.10.0 🎉 The release is available on GitHub release Your semantic-release bot 📦🚀 |
Added a new reusable action to render helm charts on both base and head refs, then post the diff as a comment or comments on the associated pull request.
There are a few changes here from what I demoed in the sandbox:
This slows down smaller changes but significantly improves performance when multiple charts need to be rendered
This is using a function adapted from the Atlantis SplitComment code to ensure we are sending comments within the limits defined by GitHub, I have also reused the summary and sep additions to string comments together.