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 - 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…
Practice while you learn with exercise files
Download the files the instructor uses to teach the course. Follow along and learn by watching, listening and practicing.
Contents
-
-
-
-
-
(Locked)
Use an action from the Marketplace4m 6s
-
(Locked)
Use an action from a repository2m 25s
-
(Locked)
Passing arguments to an action4m 6s
-
(Locked)
Using environment variables5m 10s
-
(Locked)
Using secrets4m 1s
-
(Locked)
Using artifacts4m 7s
-
(Locked)
Manage pull requests3m 30s
-
(Locked)
Challenge: Develop a workflow that creates an artifact57s
-
(Locked)
Solution: Develop a workflow that creates an artifact8m 6s
-
(Locked)
-
-
-