Chapter 8. Managing Workflow Execution

By definition, GitHub Actions workflows are more declarative than imperative. This means that, instead of writing programming logic that defines how to get things done, you create workflows largely by declaring the triggers, jobs, steps, and runners that you want to use. And, for each step, you define which actions or commands are run to do the functionality. The actions themselves abstract out the programming.

However, just because you are writing workflows mostly by declaring elements in a YAML file, that doesn’t mean you can’t control more precisely their flow of execution. GitHub Actions provides a number of constructs and approaches for precisely managing how workflows are started and how they progress once started.

To finish out this section of the book, I’ll cover some of the key constructs and approaches for controlling how the execution of your workflow can be more precisely managed. Specifically, this chapter will cover these core areas:

  • Advanced triggering from changes
  • Triggering workflows without a change
  • Dealing with concurrency
  • Running a workflow with a matrix
  • Workflow functions

Advanced Triggering from Changes

I covered the basics of triggering your workflows in Chapter 2. But, there may be situations where you need, or want, more advanced control over the triggering process. The idea is that triggers don’t have to be based just on general events. They can incorporate more specific criteria, including patterns for what’s ...

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.