-
Notifications
You must be signed in to change notification settings - Fork 44
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
Display GitHub Action Job Summary #502
Display GitHub Action Job Summary #502
Conversation
This is the complementary PR for scala-steward-org/scala-steward#3071 - while that PR _creates_ the summary report, this is the PR that links up to GitHub's `core.summary` workflow command, to _display_ the report in GitHub's Job summary. https://docs.github.com/en/actions/using-workflows/workflow-commands-for-github-actions#:~:text=core.summary https://github.blog/2022-05-09-supercharging-github-actions-with-job-summaries/#:~:text=core.summary In this change, if the `run-summary.md` file generated by the Scala Steward JVM process is found, it's written to the GitHub summary.
A snapshot release has been created as You can test it out with: uses: scala-steward-org/scala-steward-action@snapshots/502 It will be automatically recreated on any change to this PR. |
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.
Thank you very much @rtyley! 😺
Thanks @alejandrohdezma ! Are you ok to merge scala-steward-org/scala-steward#3071 too, in order to be able to try this out? |
This was something we missed from scala-steward-org#502 - because the `run-summary.md` file is saved by scala-steward-org/scala-steward#3071 to the Scala Steward workspace, and almost the entire workspace is persisted to cache by Scala Steward's GitHub Action, the report would be persisted until the _next_ run of the GitHub Action, and concievably, if the next run went wrong somehow, the incorrect _old_ summary could get reported against that subsequent run, which would be bad. The fix here is to delete the summary at the `saveWorkspaceCache()` step, which occurs after the summary has been transferred to the `GITHUB_STEP_SUMMARY` file by calling `core.summary()`.
This includes scala-steward-org/scala-steward-action#502, for a more friendly summary of which repos failed or succeeded as Scala Steward was processing them.
This is the complementary PR for scala-steward-org/scala-steward#3071.
While that PR creates the summary report, this is the PR that links up to GitHub's
core.summary
workflow command (as suggested by @alejandrohdezma in scala-steward-org/scala-steward#3071 (review)), to display the report in GitHub's Job summary.In this change, if the
run-summary.md
file generated by the Scala Steward JVM process is found, it's written to the GitHub summary - if it's not found, that's not regarded as an error, tolerating older Scala Steward versions if they're being used.