Chapter 13. Advanced Workflow Techniques

There are a set of techniques that you can use in your workflows to greatly simplify processing for a couple of less-often-encountered use cases. In this chapter, I’ve collected a few of these so that you can have them as additional tools in your Actions toolbox.

In the first part of the chapter, we’ll discuss how you can interact with GitHub components and drive GitHub functions from within your workflow through a variety of interfaces.

Then, we’ll cover more about leveraging the matrix strategy in GitHub Actions to automatically spin up sets of jobs spanning multiple input dimensions. Chapter 8 provided an intro to this, but there’s much more to discuss and explore.

Finally, we’ll cover the multiple ways you can use containers as a technique to encapsulate different environments, technologies, and functionality for your workflow to use. There are several versatile ways to take advantage of containers in your workflows, and I’ll explain each with examples. Note that this is different from building a container action as described in Chapter 11.

As a starting point, here’s how you can tie in more directly with GitHub operations from inside of your workflows.

Driving GitHub from Your Workflow

Sometimes you may need or want to do more with GitHub components than the usual structures and flows will allow. Of course, you could create a custom action to handle the task (per Chapter 11), but that may be overkill if you only need to do a task ...

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.