Blatant copy-paste from How to remove an environment variable on GitHub actions? - Stack Overflow.
On Environment variables - GitHub Docs
they describe a way to add an environment variable with yaml:
jobs: job_name: env: NAME: value
On https://docs.github.com/en/actions/reference/workflow-commands-for-github-actions/#setting-an-environment-variable linked from the same place, shows how to add an environment variable from script steps:
echo "NAME=value" >> $GITHUB_ENV
I’m looking for a way to do the opposite: given that an env var was added with one of the above options, fully remove it so that subsequent job steps don’t see it either.
echo "NAME=" >> $GITHUB_ENV
but it just sets it to empty string, I need it gone so that
env doesn’t list it any more.