Does anyone have an idea how I can create an environment variable under GitHub Actions when I run a JavaScript file? I would like to use this environment variable during a next step, in the case of a job. If it can already be used in another step, it is not difficult to transfer it to another job.
I couldn't find any solution on the Internet, only the deprecated console.log solution... Can anyone help me please? I also use octokit, but I don't understand the difference between create environment variable and create repository variable. I understand the repository variable because I can see that at my repository and I created that from my other script. But I don't see how to set the environment option anywhere under the repository. Could anyone please possibly help?
My current object is:
Make an variable at GitHub Actions workflow run at JavaScript. So at the next step I can use it.
I tried this solution: JavaScript Github Action: Writing to $GITHUB_OUTPUT without set-output and without @actions/core
Tried:
console.log(echo "TEST=VALUE")
console.log(`TEST=${myValue}`)