
This chapter covers
- The types of GitHub actions
- Authoring actions
- Providing a hands-on lab: My first docker container action
- Sharing actions
- Developing advanced actions
Now that we have explored the YAML and workflow syntax in detail, this chapter will dive into the core building block of GitHub Actions—the reusable and sharable actions themselves that give the product its name.
This chapter will cover the different types of actions and offer some tips to get started writing your first actions. We will cover this in detail in a hands-on lab, which you can follow along step by step. Additionally, the chapter will cover sharing actions in the marketplace and internally as well as some advanced topics for action authors.
4.1 Types of actions
- Docker container actions
- JavaScript actions
- Composite actions
Docker container actions only run on Linux whereas JavaScript and composite actions can be used on any platforms.
All actions are defined by a file, action.yml (or action.yaml), which contains the metadata for the action. This file cannot be named differently, meaning an action must reside in its own repository or folder. The run section in the action.yml file defines what type of action it is.