Say in the step log that the summary was written, since nothing else can
The job summary is the deliverable #83 asked for -- "readable without opening a log" -- and GitHub exposes no API that reads a job summary back: the check-run output for the advisory job returns summary: null, so a write that silently did not happen would be invisible to everything except a human on the run page. The step log can be read, so it now carries one line saying which of the two happened, including the case where GITHUB_STEP_SUMMARY is unset entirely, which is what running the script by hand looks like.
This commit is contained in:
@@ -283,6 +283,12 @@ if [ -n "${GITHUB_STEP_SUMMARY:-}" ]; then
|
||||
fi
|
||||
echo
|
||||
} >> "$GITHUB_STEP_SUMMARY"
|
||||
# The summary page is the deliverable -- "readable without opening a log" is what #83 asked
|
||||
# for -- and GitHub exposes no API for reading a job summary back, so a write that silently
|
||||
# did not happen would be invisible. This line is in the step log, which can be read.
|
||||
echo " (the table above is also on the job summary page)"
|
||||
else
|
||||
echo " (GITHUB_STEP_SUMMARY is unset -- step log only)"
|
||||
fi
|
||||
|
||||
exit 0
|
||||
|
||||
Reference in New Issue
Block a user