GITHUB_ENV

A file, named by the GITHUB_ENV variable, where a step writes name=value lines to set environment variables for later steps of the same job.

In more detail

The variable is not visible in the step that writes it, only in the steps after it. It suits values computed during a job that later steps need as ordinary environment variables.

Example

echo "DEPLOY_SHA=${{ github.sha }}" >> "$GITHUB_ENV"

Related terms

Taught in

References

Certification courses