-
Notifications
You must be signed in to change notification settings - Fork 1.5k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
toJson(steps) always empty #338
Comments
@rbellamy , the steps content only consists of outputs from steps at this moment. if your steps don't have any outputs set, you will get an empty steps context. Try using the set-output command then echoing the steps contexts
You should see the output
We document what is in the steps context here: https://help.github.com/en/actions/reference/context-and-expression-syntax-for-github-actions#steps-context |
Em... |
Then why we need default options which are should be defined everytime? Why they r described in docs if they rn't exists at all? |
Hey @afwn90cj93201nixr2e1re , The steps context is not getting populated in your example because you need to set the For example you can set your steps to be:
And you will see the output
Thank you for your feedback regarding the documentation, I'll go ahead and get that updated so we can alleviate this confusion! We should be directly stating that only steps with We recently added the conclusion and outcome fields, they were not available when I originally responded, but I hope they prove helpful to you! |
damn, thanks, can u add it into docs? |
I realize this is late, but can you explain the reasoning behind this, @thboop? |
Describe the bug
The documentation on exploring contexts found at "Example printing context information to the log file" says I should be able to add a step that dumps the context of all the steps.
This issue is mentioned in passing in #126. However, the specific solution for that user doesn't actually address the fact that
toJson(steps)
seems to always be empty, contrary to what the documentation appears to say.However, it is always empty:
To Reproduce
Steps to reproduce the behavior: see above.
Expected behavior
A JSON dump of the context of all steps.
The text was updated successfully, but these errors were encountered: