Uh oh!
There was an error while loading. Please reload this page.
How to use multiline variable in a script #458
Unanswered
baxelrod-bdai
asked this question in
Q&A
Replies: 1 comment
I'd recommend passing inputs through an environment variable into your script rather than inlining the expression. https://github.com/actions/github-script#use-env-as-input For example: - name: Step3uses: actions/github-script@v6env:
LONG_OUTPUT: ${{ steps.stepone.outputs.long2 }}with:
script: | github.rest.issues.createComment({ issue_number: context.issue.number, owner: context.repo.owner, repo: context.repo.repo, body: process.env.LONG_OUTPUT }) |
0 replies
Sign up for freeto join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
I am having trouble using a multiline variable in the
scriptpart of actionactions/github-script@v6.I found out how to convert it to a one line string, and this works fine in the
runpart of a second step. For example, this works:However, when I try to display this in a PR comment, I get an error.
All reactions