docs icon indicating copy to clipboard operation
docs copied to clipboard

Escaping chars for workflow commands

Open matthew16550 opened this issue 4 years ago • 5 comments

Code of Conduct

What article on docs.github.com is affected?

https://docs.github.com/en/actions/learn-github-actions/workflow-commands-for-github-actions

What part(s) of the article would you like to see updated?

This community topic says we can percent escape \r & \n for ::set-output.

https://github.community/t/set-output-truncates-multiline-strings/16852

I do not see it mentioned in the doc.

It would be good to explain the details e.g. is it all commands or only ::set-output, and which chars?

Additional information

No response


Edited by maintainer

Content Plan

Here is the writer's content design plan for this issue.

matthew16550 avatar Nov 05 '21 10:11 matthew16550

Thanks for opening this issue. A GitHub docs team member should be by to give feedback soon. In the meantime, please check out the contributing guidelines.

welcome[bot] avatar Nov 05 '21 10:11 welcome[bot]

const result = await request({ method: "GET", url: "/orgs/{org}/repos", headers: { authorization: "token 0000000000000000000000000000000000000001", }, org: "octokit", type: "private", });

vozvenas1729 avatar Nov 05 '21 11:11 vozvenas1729

Start

vozvenas1729 avatar Nov 05 '21 11:11 vozvenas1729

@matthew16550 Thanks so much for opening an issue! I'll get this triaged for review :zap:

ramyaparimi avatar Nov 05 '21 13:11 ramyaparimi

Hi @matthew16550, thanks for opening this issue. I think the easiest way at the moment to escape multiline strings for setting an output is to create an environment variable in one step, and then use it in a workflow command in the next step, similar to @Simran-B's solution here.

Feel free to open a PR add a link to the Setting an output parameter section linking to the environment variable section for this.

lucascosti avatar Jan 14 '22 04:01 lucascosti

today I was jumped in my own house on my way to my dreams . It was horrible then I was awakened by strangers calling me Sandra and an uneducated fat kid who looks like he been hit by an ugly stick my mom still trying her damnedest to sleep with my husband I can't believe it she is a non essential

BeenGoneNegin avatar Oct 12 '22 03:10 BeenGoneNegin