Skip to content

Commit

Permalink
Print GitHub summary directly if running locally
Browse files Browse the repository at this point in the history
  • Loading branch information
Alexander01998 committed Dec 23, 2024
1 parent 340056c commit 853d3f3
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion scripts/util.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ def read_json_file(path: Path) -> dict:
def add_github_summary(summary: str):
"""Add a line to the GitHub Actions summary for the current step."""
if "GITHUB_STEP_SUMMARY" not in os.environ:
print(f"Not running on GHA, would have set summary: {summary}")
print(summary)
return
with open(os.environ["GITHUB_STEP_SUMMARY"], "a") as summary_file:
print(summary, file=summary_file)

0 comments on commit 853d3f3

Please sign in to comment.