Skip to content

Commit

Permalink
Update entrypoint.py
Browse files Browse the repository at this point in the history
  • Loading branch information
cicirello committed Oct 21, 2022
1 parent ed5a4cb commit aebacaf
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions entrypoint.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
# if you use pyaction:4.0.0 or higher as your base docker image.

import sys
import os

if __name__ == "__main__" :
# Rename these variables to something meaningful
Expand All @@ -18,7 +19,9 @@
output1 = "Hello"
output2 = "World"

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

0 comments on commit aebacaf

Please sign in to comment.