Skip to content

Commit b39357e

Browse files
authored
Merge pull request #10 from cicirello/fix-deprecated
Replaced use of deprecated set-output in entrypoint.py
2 parents ed5a4cb + aebacaf commit b39357e

1 file changed

Lines changed: 6 additions & 3 deletions

File tree

entrypoint.py

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@
77
# if you use pyaction:4.0.0 or higher as your base docker image.
88

99
import sys
10+
import os
1011

1112
if __name__ == "__main__" :
1213
# Rename these variables to something meaningful
@@ -18,7 +19,9 @@
1819
output1 = "Hello"
1920
output2 = "World"
2021

21-
# This is how you produce outputs.
22+
# This is how you produce workflow outputs.
2223
# Make sure corresponds to output variable names in action.yml
23-
print("::set-output name=output-one::" + output1)
24-
print("::set-output name=output-two::" + output2)
24+
if "GITHUB_OUTPUT" in os.environ :
25+
with open(os.environ["GITHUB_OUTPUT"], "a") as f :
26+
print("{0}={1}".format("output-one", output1), file=f)
27+
print("{0}={1}".format("output-two", output2), file=f)

0 commit comments

Comments
 (0)