3 ms·
I love the design of this! echo '### Hello world! :rocket:' >> $GITHUB_STEP_SUMMARY Having this as an environment variable you can write to that is really
by simonw 5y ago
I love the design of this!
echo '### Hello world! :rocket:' >> $GITHUB_STEP_SUMMARY
Having this as an environment variable you can write to that is really clever, and makes it easy to generate these from other scripts (or Python commands etc) too.
- jffry 5y agoSmall clarification, because I had the same misconception: $GITHUB_STEP_SUMMARY is just an env var containing the name of a file
- simonw 5y agoYeah https://docs.github.com/en/actions/using-workflows/workflow-commands-for-github-actions#adding-a-job-summary https://docs.github.com/en/actions/using-workflows/workflow-... has some more details on this - it even suggests that if you want to delete the summary entirely you can do: rm $GITHUB_STEP_SUMMARY
- divbzero 5y agoThanks, it was fuzzy at first to me as well. The official description of $GITHUB_STEP_SUMMARY reveals a bit of the implementation details: > The path on the runner to the file that contains job summaries from workflow commands. This file is unique to the current step and changes for each step in a job. For example, /home/rob/runner/_layout/_work/_temp/_runner_file_commands/step_summary_1cb22d7f-5663-41a8-9ffc-13472605c76c. https://docs.github.com/en/actions/learn-github-actions/environment-variables#default-environment-variables https://docs.github.com/en/actions/learn-github-actions/envi...