Replace deprecated "set-env" #26345
-
Dear Community, I am using deprecated “set-env” and now I have to fix it. I am using it like this:
What is the new alternative for that? Thank you! |
Beta Was this translation helpful? Give feedback.
Replies: 5 comments
-
This has been replaced by passing variables into Workflow commands for GitHub Actions - GitHub DocsFor example:
The only thing I believe you’ll need to change in your workflow is |
Beta Was this translation helpful? Give feedback.
-
Edit: Thank you! It works. I was using the delimiter the wrong way. Now its fine. Thank you! I tried this, but the action fails:
The strings are multiline. |
Beta Was this translation helpful? Give feedback.
-
@benwick91 can you share? I’m having trouble with this. My old env:
If tried the new way like so:
|
Beta Was this translation helpful? Give feedback.
-
I am using it this way:
Your way seems to be right and the you sould can use it with But in your old env you doesn’t use I hope this helps :slight_smile: |
Beta Was this translation helpful? Give feedback.
-
@benwick91 - yeah I guess the old way is still fine. I was under the assumption that it was the same as set-env and being deprecated. 🤦♂️ |
Beta Was this translation helpful? Give feedback.
This has been replaced by passing variables into
$GITHUB_ENV
.docs.github.com
Workflow commands for GitHub Actions - GitHub Docs
For example:
The only thing I believe you’ll need to change in your workflow is
echo
commands and convert them to the new syntax. Be aware that this may be slightly different if your strings are multiline.