Github actions: Using GITHUB_ENV to share data between steps

github share variable environment variable

1 min read | by Jordi Prats

If we want to share data between steps (on a Github action) it's just not enough to export a variable like this:


To be able to share data between steps we'll need to use GITHUB_ENV like so:


So, assuming we want to export the contents of $VARIABLE_NAME we can push the variable and it's value using the following command:


Using set-env have been deprecated for a while now, exporting data using GITHUB_ENV is the new way to go

Posted on 05/10/2021