%note add info about sending emails

%note add info about testing actions locally

GitHub Actions allow you to run code in your repository, on GitHub servers, after every push.

This can be used for many things. This article discusses how to use it for running tests (as a replacement for hosted CI services like travis.ci).

A GitHub Action is defined by a Dockerfile in some GitHub repository. Since you can have multiple actions, you create a directory for each action.

An action is triggered by a workflow description in .github/main.workflow file in a repository.

Workflow is specific to each repository, actions can be shared.

A workflow running time (a sum of all actions in a workflow) is limited to 1 hr.

Workflow

Here's the simplest workflow:

workflow "run go test on push" {
  on = "push"
  resolves = ["test"]
}

action "test" {
  uses = "kjk/siser/action-go-test@master"
}

Explaining workflow section:

For a full list of options see documentation.

Explaining: action section: