From reminding reviewers of languishing PRs to packaging up release assets, you can use GitHub Actions to automate all sorts of activities, not just CI, in response to various events in your GitHub repositories.
Resource information | Details |
---|---|
Web Page | Getting Started with GitHub Actions |
Authors | Daniel Weibel |
Focus | Version control, Testing |
Resource information | Details |
---|---|
Web Page | Getting the Gist of GitHub Actions |
Authors | Brendon Smith |
Focus | Version control, Testing |
The above web resources, Getting Started with GitHub Actions and Getting the Gist of GitHub Actions, provide a good starting point and overview of GitHub Actions service. These articles describe the basic concepts of GitHub Actions, such as workflows, jobs, and steps, and also present several simple example workflows.
Some background on GitHub Actions service:
GitHub introduced GitHub Actions service in 2018.
You can discover, create, and share actions to perform any job you'd like, including Continuous Integration/Continuous Delivery-Deployment (CI/CD), and combine actions in a completely customized workflow.
The GitHub Actions service is often described in the context of CI/CD workflows. However, GitHub Actions, can go beyond this, and is designed to support automation of all kinds of tasks associated with a software project and its repository(s). The naming is a bit confusing because Actions is used both in the (1) name of the service, GitHub Actions, and (2) name of a key building block used in that service, Actions, typically found in the GitHub marketplace.
The overarching abstraction, with GitHub Actions, is a workflow defined by Yaml files in the .github/workflows
of a GitHub repository. In this respect, GitHub Actions are similar to GitLab's CI/CD. A workflow is
triggered
by various events in a repository and uses actions
in preparation for executing one or more jobs, with whatever synchrony is needed.
Typically, the Yaml scripts defining workflows involve a combination of
GitHub-defined yaml
keywords and syntax,
actions from the marketplace
and minimal amounts of python or shell code. In advanced cases, marketplace actions may be
customized or wholly new actions may
be implemented using either JavaScript or Docker Containers.
Although GitHub's REST API has long provided the functionality needed for projects to script up almost any workflow they may wish, Actions were introduced with the goal of providing an easier to use and more convenient interface. Whether that goal was achieved may be debatable. Certainly, one price to pay for this convenience is that anything automated with GitHub Actions will likely work only on GitHub and nowhere else. In fact, it is often difficult even to test GitHub Action workflows locally. Depending on the kind of activity to be automated, it may be best for a project to minimize dependence on Actions by using a single-job workflow that invokes a shell or python script where the majority of actual automation work is implemented.