Components of GitHub Actions
Now that we’ve learned what GitHub Actions is, let’s see the components of GitHub Actions that help us do DevOps and run workflows when events get triggered.
Here are the components of GitHub Actions:
- Workflows: This is a configurable YAML file in a repository’s directory, such as
.github/workflows
, that runs jobs manually, automatically triggers an event, or does so by setting a schedule. - Events: Events are activities in a repository that cause your workflow to start running. Common events you might see in a workflow file are
pull_request
,push
, andschedule
. However, other events can be useful, depending on your needs. - Jobs: A job is a set or group of steps (script or action) in a workflow. A particular job executes in the same runner throughout the steps.
- Actions: An action performs the task at hand or anything you need, such as checking out your repository, building your application, testing your application...