echo 'SOME_VAR=some-value' >> $GITHUB_ENV can be used to set an environment variable for subsequent steps, but there seems to be no documented way to unset it.
Note that echo 'SOME_VAR=' >> $GITHUB_ENV will set it to the empty value, but that's different from not having the variable set at all.
Rationale: In some workflows, it might be necessary to checkout and/or run untrusted code. At that point I'd like to clean up as much sensitive values as possible. Unsetting env vars (like SSH_AGENT_PID or SSH_AUTH_SOCK) is part of this.
echo 'SOME_VAR=some-value' >> $GITHUB_ENVcan be used to set an environment variable for subsequent steps, but there seems to be no documented way to unset it.Note that
echo 'SOME_VAR=' >> $GITHUB_ENVwill set it to the empty value, but that's different from not having the variable set at all.Rationale: In some workflows, it might be necessary to checkout and/or run untrusted code. At that point I'd like to clean up as much sensitive values as possible. Unsetting env vars (like
SSH_AGENT_PIDorSSH_AUTH_SOCK) is part of this.