Chapter 3. What’s in an action?

In Chapter 2, we explored how GitHub Actions does its processing. The core functionality centers around workflows—the code that runs in response to an event and executes jobs to do some work. At the lowest level in your workflow, the workflow’s jobs execute steps. And steps can call either an OS command or an implementation of separate functionality that GitHub Actions simply refers to as an action.

Workflows versus actions

Since the distinction between actions and workflows can be one of the points that remains confusing for a while, here’s a reminder to think of actions as being like plug-ins or modules in other applications and the workflows as being more like the pipelines or scripts that use those modules or plug-ins.

You have the background now to understand where the implementation of an actual action is used—when a step in a workflow calls it. In this chapter, I’ll continue the broad overview of the GitHub Actions platform by looking at what makes up an individual action. Specifically, I’ll discuss the following:

  • The structure of an action
  • Interfacing with actions
  • Using actions
  • Public actions and the Actions Marketplace

Implementation of an action

Note that this chapter does not describe how to create a new action. Chapter 11 goes into detail on how to create your own custom action.

The Structure of an action

The implementation of an action can range from very simple to very complex. On the simple side, it might be a small shell script ...

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.