-
Notifications
You must be signed in to change notification settings - Fork 12
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
output the raw summary passed to GH Actions Job Summaries #45
base: main
Are you sure you want to change the base?
Conversation
Thanks for the PR @dom-colangelo! Just to make sure I understand: can you say a bit more about your use case here? Is the idea that you want to re-consume/emit the markdown summary elsewhere in your CI? |
Yup, exactly! I think this adds value to the action as the GH API docs don't seem to indicate any logical way to retrieve the summary value. |
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.
A few small nitpicks/comments.
Makes sense, thank you! |
LGTM overall (modulo one last nitpick)! Could you add a short self-test for this as well? I think it'd be sufficient to tack it onto one of the pre-existing tests, and make it as simple as a |
Test failures look like this:
I think we probably need to base64 encode the job summary before stuffing it into an output variable, similar to how the (Actually, taking a step back: is there a reason you can't use that output? It's marked as internal-only right now, but the only difference between it and this new output is that it's "pure" markdown, whereas the Job Summary output also has a bit of HTML mixed in. If the "pure" output is okay, we can stabilize it instead.) |
Ahh yeah, your observation & test output pointed me to the fact that multiline env vars in GH Actions are kind of a pain. |
Sounds good! In that case, if you refactor this PR to make that output public rather than internal only, I'd be happy to merge that. |
Done! I renamed the output |
I believe these self-tests are failing since I'm renaming the var they use for verifying as part of this PR |
That might be it. I'll take a closer look tonight 🙂. (Sorry for the prolonged review here -- I don't have too many cycles for this action at the moment.) |
Add the raw markdown sent to the GitHub Actions Job Summaries page as an output of the action. Allows other steps/jobs to use this raw output without needing to fetch it from the GH API (which currently does not have a working/documented implementation)