Skip to content

Set-output Truncates Multiline Strings #26288

Answered by Yanjingzhu
jacderida asked this question in Actions
Discussion options

You must be logged in to vote

I got response from the team. 

% and \n and \r can be escaped like below, the runner will unescape in reverse.

content="${content//'%'/'%25'}"
content="${content//$'\n'/'%0A'}"
content="${content//$'\r'/'%0D'}"

Please try to add next three red lines to your yml, kindly let me know whether this could help.

- shell: bash
        id: release_description
        run: |
          description=$(./resources/get_release_description.sh ${{ steps.versioning.outputs.cli_version }})
          echo $description
<font color="#FF0000"> description="${description//'%'/'%25'}"
          description="${description//$'\n'/'%0A'}"
          description="${description//$'\r'/'%0D'}"</font>
echo "::set-output…

Replies: 20 comments 10 replies

Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Answer selected
Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
1 reply
@John4650-hub
Comment options

Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
9 replies
@lukasz-mitka
Comment options

@norwd
Comment options

@manumaan
Comment options

@karfau
Comment options

@bewuethr
Comment options

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Actions Build, test, and automate your deployment pipeline with world-class CI/CD