docs icon indicating copy to clipboard operation
docs copied to clipboard

::set-output does not document that `value` cannot contain newlines

Open jsoref opened this issue 3 years ago • 3 comments

What article on docs.github.com is affected?

https://docs.github.com/en/actions/reference/workflow-commands-for-github-actions#setting-an-output-parameter

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

It should indicate that value cannot contain newlines.

Additional information

https://github.community/t/use-ssh-key-from-secret-in-output-set-output/141071/2 https://github.community/t/set-output-truncates-multiline-strings/16852/3

Content design plan

  • Document the solution from https://github.community/t/set-output-truncates-multiline-strings/16852/3 in https://docs.github.com/en/actions/reference/workflow-commands-for-github-actions#setting-an-output-parameter.

jsoref avatar May 23 '21 14:05 jsoref

Thanks for opening an issue @jsoref! I'll triage this for the team to take a look 👀

janiceilene avatar May 25 '21 00:05 janiceilene

Thanks @jsoref! The solution in https://github.community/t/set-output-truncates-multiline-strings/16852/3 would be good to document. You or anyone else is welcome to do so!

lecoursen avatar May 27 '21 19:05 lecoursen

@lecoursen: I found the solution so icky that I didn't want to be blamed for documenting it (c.f. https://github.community/t/set-output-truncates-multiline-strings/16852/5), hence just filing a bug asking that it be documented as opposed to writing the documentation.

That said, once it is officially documented, I'll be quite happy to point to it / rely on it to work 😄 .

jsoref avatar May 27 '21 19:05 jsoref

Sigh

jsoref avatar Aug 22 '23 00:08 jsoref

thanks for sharing alot of information

Muhammad-Saleem1Ch avatar Oct 09 '23 19:10 Muhammad-Saleem1Ch

Hi @jsoref and @lecoursen!

It seems that in the time since this issue was posted, it has been solved with the introduction of GITHUB env files. Substituting set-output with $GITHUB_OUTPUT, in conjunction with a delimiter, allows for multiline output. These options are already documented in the two sections immediately preceding the one linked to this issue.

Ref closed issue #21529 with regard to using a delimiter for multiline output.

As there is a planned deprecation for the set-output command, I would recommend that this issue be marked as closed.

mark-mxwl avatar Dec 14 '23 22:12 mark-mxwl