From the course: Learning GitHub Actions

Unlock the full course today

Join today to access over 24,200 courses taught by industry experts.

Using environment variables

Using environment variables - GitHub Tutorial

From the course: Learning GitHub Actions

Using environment variables

- [Instructor] Sometimes actions need additional information provided to them at runtime. This can be accomplished with environment variables, environment variables are a dynamic key value pairs stored in memory on the virtual environment, running our workflow, commands and actions running as steps can access environment variables to use the information that they hold. These values are read as the process runs. In other words, they aren't already stored in the virtual environment. Instead, the values are injected when the environment starts to run and before any commands are called. Environment variables are case sensitive. So when they're referenced in a workflow or step, the reference needs to match the variable exactly as it's defined. GitHub sets default environment variables that are available to every step in a workflow. These default variables start with GitHub in all caps with the exception of the home environment…

Contents