The platform GitHub Actions allows users to automate various actions by providing con­tinu­ous in­teg­ra­tion and con­tinu­ous delivery. With GitHub Actions, you don’t have to complete re­pet­it­ive tasks manually anymore, allowing you to fully con­cen­trate on the more important aspects of your project.

What is GitHub Actions?

GitHub Actions is the con­tinu­ous in­teg­ra­tion and con­tinu­ous delivery (CI/CD) platform of GitHub. It allows users to automate re­pos­it­or­ies and create GitHub workflows. For example, you can compile new code or run project-related unit tests every time code is updated in the GitHub re­pos­it­ory.

How does GitHub Actions work?

GitHub Actions leverages your own GitHub workflows. Within these workflows, you can react to various events, such as push requests, by executing specific actions. The workflow itself consists of different jobs, each running in its own virtual machine or within a container. GitHub supports Linux, Windows, and macOS VMs.

Tip

If you want to deploy your projects and websites directly, Deploy Now from IONOS is the ideal solution. You can use it to customise your automated GitHub workflows anytime.

GitHub Actions tutorial on the most important functions

Workflows

A GitHub workflow is the central element within GitHub Actions. A workflow is really nothing more than a YAML file that you use to specify which actions should be initiated when certain events occur. However, not just events can trigger workflows. You can also ensure that your workflow is executed manually, or even set up fixed times by using schedul­ing. Every GitHub workflow starts one or more jobs. You don’t have to limit yourself to one workflow per re­pos­it­ory and can specify any number of workflows in your GitHub re­pos­it­ory.

Events

As mentioned, workflows are often triggered by events. Events are specific actions in your GitHub re­pos­it­ory that start the execution of a workflow. A pull request is a common example of a GitHub event. There are countless events in GitHub. For a complete list, take a look at the GitHub doc­u­ment­a­tion.

Actions

As the name suggest, actions are a central part of GitHub Actions. An action is an in­di­vidu­al GitHub ap­plic­a­tion that carries out frequent and complex tasks. They can be used like functions within your workflow files to avoid repeating code. If you don’t want to write your own GitHub actions, you can find a number of pre­defined actions in the GitHub mar­ket­place.

Steps

Steps are in­di­vidu­al job com­pon­ents. They can be shell scripts that are executed or an action that is started. Steps are processed in the order in which they are defined. Fur­ther­more, the steps are dependent on each other and can exchange data within each other.

Jobs

A job is a sequence of steps that are executed on a runner. Although jobs are in­de­pend­ent, you can create de­pend­en­cies between in­di­vidu­al jobs manually. This results in a job having to wait for all the jobs it depends on to execute first. This in­ter­rupts the otherwise normal, parallel execution of different jobs.

Runner

A runner is the server on which your triggered workflows are run. Each runner can run exactly one job at a time. The runners are basically virtual machines. GitHub supports Ubuntu, Windows and macOS operating systems. If you need to use a different operating system to test your projects, you can, of course, host your own runners.

What are the ad­vant­ages of using GitHub Actions?

In addition to the seamless in­teg­ra­tion of GitHub Actions into your own GitHub platform, the CI service offers other benefits as well. For example, pre­defined templates mean you don’t ne­ces­sar­ily have to use your own workflows. Plus, the GitHub service is com­pletely free to use for your public re­pos­it­or­ies. For private repos, GitHub provides you with 2,000 minutes per month for hosted workflows.

Go to Main Menu