default environment variables

Variables such as GITHUB_SHA, GITHUB_REF and RUNNER_OS that the runner sets for every step before your commands run.

In more detail

They carry cheap facts about the run: the commit SHA, the ref that was pushed, the actor who caused the run, the event name, the runner operating system and architecture, and CI set to true. Scripts read them like any other environment variable, and the same facts are available to expressions through the github and runner contexts.

Example

echo "sha: ${GITHUB_SHA:0:7}"

Related terms

Taught in

References

Certification courses