Skip to content

Commit 4a15c91

Browse files
authored
Merge pull request #13 from Bibo-Joshi/set-summary
Add `set_summary`
2 parents 2f75b06 + cd9e392 commit 4a15c91

File tree

2 files changed

+11
-0
lines changed

2 files changed

+11
-0
lines changed

README.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -118,6 +118,12 @@ Sets an output parameter.
118118

119119
Sets an environment variable for use in later steps.
120120

121+
### Set summary
122+
123+
**Signature**: `def set_summary(value)`
124+
125+
Sets an environment variable to display as job summary.
126+
121127
### Debug
122128

123129
**Signature**: `debug(message)`

dist/util.py

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,11 @@ def set_env(name, value):
2020
print(f"{name}={_escape_data(value)}", file=env)
2121

2222

23+
def set_summary(value):
24+
with open(os.getenv("GITHUB_STEP_SUMMARY"), "a") as env:
25+
print(value, file=env)
26+
27+
2328
def debug(message):
2429
print(f"::debug::{_escape_data(message)}")
2530

0 commit comments

Comments
 (0)