- Notifications
You must be signed in to change notification settings - Fork455
comment the file content to the PR#341
-
The comment is showing as "$(cat sample.out)" instead of the actual file content. Below is the code for reference. Can someone what changes required to the "body: " in below code to get the required comment. ` - name: set file as an output variable
|
BetaWas this translation helpful?Give feedback.
All reactions
🚀 2
Replies: 2 comments 8 replies
-
👋 In Bash, single quotes will cause the value to be taken literally rather than evaluating that command in the https://www.gnu.org/software/bash/manual/html_node/Single-Quotes.html Try using echo"$(cat sample.out)">>$GITHUB_OUTPUT Alternatively, you could redirect the output of cat sample.out>>$GITHUB_OUTPUT |
BetaWas this translation helpful?Give feedback.
All reactions
-
@joshmgross I'm doing something similar
But i'm getting "Error: Unhandled error: SyntaxError: Invalid or unexpected token" |
BetaWas this translation helpful?Give feedback.
All reactions
👀 1
Uh oh!
There was an error while loading.Please reload this page.
Uh oh!
There was an error while loading.Please reload this page.
-
Thanks@joshmgross , it worked !!! |
BetaWas this translation helpful?Give feedback.
All reactions
Uh oh!
There was an error while loading.Please reload this page.
Uh oh!
There was an error while loading.Please reload this page.
-
This didn't work for me, the env var was just set to "steps.keploytestreport.outputs.KEPLOY_REPORT" so that's what I saw in the github comment (literally). What I needed to do was wrap it in ${{ }} - so:
I hope that helps someone in the future. All the escaping complexities in GH workflows are baffling, I'm tempted to make a website just to cover all this lol |
BetaWas this translation helpful?Give feedback.
All reactions
❤️ 2
-
Thanks@johnrhunt for the correction, I updated my comment in case someone in the future decides to copy it without reading the full thread.
Let me know if there's anything I can do to help, agreed it can be pretty confusing at times. |
BetaWas this translation helpful?Give feedback.
All reactions
-
I'm trying to achieve basically the same here, and after reading through many threads I got a comment with previous' step results, but the escaping complexities are real. Here's the createdcomment and my script looks like this:
(source) If I may ask, do you habe an idea why it doesn't escape right? (and also, why there's no multiline output?) |
BetaWas this translation helpful?Give feedback.
All reactions
-
forget it, fixed it by using EOF :) |
BetaWas this translation helpful?Give feedback.