From the course: GitHub Actions Cert Prep by Microsoft Press
Unlock this course with a free trial
Join today to access over 24,600 courses taught by industry experts.
Demonstrate how to use default environment variables in a workflow - GitHub Tutorial
From the course: GitHub Actions Cert Prep by Microsoft Press
Demonstrate how to use default environment variables in a workflow
- [Instructor] We've seen thus far that GitHub provides us with a library of built-in variables like these ones here, GITHUB_SHA and GITHUB_REPOSITORY, that give us, well, quite a bit of flexibility. We can include metadata about GitHub, any aspect of it, and any artifact that we have within GitHub is reachable, and we can share this information with the runners that are processing our workflows. Very powerful stuff indeed. So this is a reminder, don't forget about these default environment variables, and incorporate them in workflow steps to support dynamic behavior. For example, using GITHUB_SHA to tag a built Docker image. Right, that makes sense. Because these environment variables are actually objects that you can interact with as well. It's a very different way of thinking. I admire those GitHub developers. Yes, I value the whole world who pushes their code to GitHub, but I'm talking about the engineers who work for GitHub, who work on the website. Well, let me stop fanboying…
Contents
-
-
-
-
-
-
-
-
Learning objectives28s
-
(Locked)
Identify the event that triggered a workflow from its effects in a repository, issue, or pull request1m 23s
-
(Locked)
Describe a workflow's effects from reading its configuration file1m 26s
-
(Locked)
Diagnose a failed workflow run1m 11s
-
(Locked)
Identify ways to access the workflow logs from the user interface37s
-
(Locked)
Identify ways to access the workflow logs from the REST API in GitHub1m 35s
-
(Locked)
Enable step debug logging in a workflow1m 26s
-
(Locked)
Demonstrate how to use default environment variables in a workflow1m 33s
-
(Locked)
Demonstrate the correct syntax for passing custom environment variables in a workflow step11m 8s
-
-
-
-
-
-
-
-
-
-