How can I get the generated version in a different step of the job? #48
-
Hey @PaulHatch, I'm using your action to generate the versions, however, I am not to sure in which variable does your action save the generated version. If I use ${version} it is coming as blank. Could you please give me a hand? |
Beta Was this translation helpful? Give feedback.
Replies: 5 comments 4 replies
-
Nevermind, I already figured it out. |
Beta Was this translation helpful? Give feedback.
-
Looks like you are trying to use the ${{ version }} directly in the action. You’d need to include the full path of the output you are trying to reference like ${{ steps.version.outputs.version }}.
… On Jun 19, 2022, at 23:56, Amit Sengupta ***@***.***> wrote:
Hey Paul,
Same question as the author above. I don't get the version in the last step. What am I missing?
—
Reply to this email directly, view it on GitHub, or unsubscribe.
You are receiving this because you were mentioned.
|
Beta Was this translation helpful? Give feedback.
-
For anyone still confused by this, I got it figured out. Add an
Then access it as an environment variable, after specifically setting it as an environment variable in the
I'm sure there's also an easier way to do this, but for someone new to GithubActions, this wasn't immediately obvious to me. |
Beta Was this translation helpful? Give feedback.
-
I don't see any mention of how to do this in the docs? I am new to github actions, so this "outputs" thing is completely unknown to me. |
Beta Was this translation helpful? Give feedback.
-
As @mortenn mentions, this is critical, this information needs to be in the documentation. How does one collect the outputs? Been searching the whole day. It seems like a secret. |
Beta Was this translation helpful? Give feedback.
Nevermind, I already figured it out.
Thanks!