July 16th, 2020
0 reactions

GitHub Actions Overview

Developer Support
Cloud Solution Architects

In this post, App Dev Managers Bernard Apolinario, Sujith Nair, and Latha Natarajan give a thorough overview of GitHub Actions.


GitHub Actions enables you to create custom workflows directly in your GitHub repository. You can discover, create, and share actions to perform any job you’d like, including CI/CD, and combine actions in a completely customized workflow. You can create continuous integration (CI) workflows that build, and test projects written in different programming languages.

GitHub Actions for JavaScript and TypeScript

GitHub Actions for Python

GitHub Actions for Java

GitHub Actions for Docker

Workflows run in Linux, macOS, Windows, and containers on GitHub-hosted machines, called ‘runners’. Alternatively, you can also host your own runners to run workflows on machines you own or manage. For more information see, “About self-hosted runners.”

Workflows

A workflow is a configurable automated process made up of one or more jobs. You can setup workflows in your repository to build, test, package, release, or deploy any project on GitHub. Workflows are stored in the .github/workflows directory in the root of your repository. There is a requirement to have at least one job in a workflow. A job contains a set of steps that perform tasks (Commands or Actions)

Workflows can be configured to start when:

  • An event occurs on GitHub
    • a commit is pushed
    • issue or pull is requested
  • A scheduled event begins
  • An external event occurs

More details on workflow triggers can be found here

Workflows in GitHub Actions are created as YAML files and saved in your repository. Once the workflow has been created and triggered, the logs, test results, artifacts, and the status for each step will be available for review. For more information see “Managing a workflow run.”

Matrix builds

GitHub Actions saves you time by allowing you to test on multiple operating systems, platforms, and language versions at the same time using a build matrix.

You can create a matrix to run workflows on more than one operating system. You can also specify more than one matrix configuration. This example creates a matrix of 6 jobs:

  • 2 operating systems specified in the os array
  • 3 Node.js versions specified in the node array

When you define a matrix of operating systems, you must set the value of runs-on to the matrix.os context property you defined.