Chapter 6. Managing Your Workflow Environments

Beyond the basic structure and components covered in Part I of this book, GitHub Actions offers a rich set of functionality to build out and support your automation. In this section of the book, I’ll cover some key areas that you’ll want to understand and manage to get the most functionality out of the workflows you create.

In this chapter, I’ll focus on the items that you can manage and leverage to define the environment that your workflow uses. The topics covered here include the following:

  • Naming your workflow and workflow runs
  • Contexts
  • Environment variables
  • Secrets and configuration variables
  • Managing permissions for your workflows
  • Deployment environments

I’m going to start with the most straightforward—naming your workflow and workflow runs.

Naming Your Workflow and Workflow Runs

Chapter 4 referenced the name of a workflow as part of the coding examples. In the workflow syntax, GitHub Actions provides keywords that allow you to name both your workflow and the runs of the workflow. You can use the name keyword to set the displayed name of your workflow on the Actions tab, as in:

name: Pipeline

This is surfaced in the Actions tab, as shown in Figure 6-1.

Figure 6-1. Workflow with name set

If you don’t set this value, GitHub Actions will set it to be the name of the workflow file, relative to the root of the repository.

You ...

Get Learning GitHub Actions now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.