Skip to content

Commit

Permalink
fix setting multi-line strings as github step output
Browse files Browse the repository at this point in the history
  • Loading branch information
FynnBe committed Jan 17, 2025
1 parent a3c7768 commit caa1ef6
Showing 1 changed file with 12 additions and 3 deletions.
15 changes: 12 additions & 3 deletions .github/workflows/upload_via_issue.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -37,9 +37,18 @@ jobs:
msg = f"Expected issue body to start with the '@bioimageiobot, please upload' issue body template with a checked Terms of Service checkbox.\nPlease create a new issue if you do want to upload a bioimage.io package. Thank you! :pray:"
package_url = ""
with open(os.environ['GITHUB_OUTPUT'], 'a') as fh:
print(f'message={msg}', file=fh)
print(f'package_url={package_url}', file=fh)
import uuid
def set_output(name, value):
"""adapted from https://github.com/orgs/community/discussions/28146#discussioncomment-5638014"""
with open(os.environ['GITHUB_OUTPUT'], 'a') as fh:
delimiter = uuid.uuid1()
print(f'{name}<<{delimiter}', file=fh)
print(value, file=fh)
print(delimiter, file=fh)
set_output("message", msg)
set_output("package_url", package_url)
env:
BODY: ${{github.event.issue.body}}
Expand Down

0 comments on commit caa1ef6

Please sign in to comment.