A collection of GitHub Actions that can be used to automate the testing, building, and deployment of custom GitHub Actions using workflows
Branch: master
Clone or download
parkr Merge pull request #4 from actions/codeowners
Add a CODEOWNERS file to streamline review.
Latest commit abd46f0 Feb 12, 2019
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
.github Add a CODEOWNERS file to streamline review. Feb 9, 2019
docker Initial commit Oct 16, 2018
make Initial commit Oct 16, 2018
shell Initial commit Oct 16, 2018
.dockerfile_lint Initial commit Oct 16, 2018
.gitignore Initial commit Oct 16, 2018
LICENSE Initial commit Oct 16, 2018
Makefile Initial commit Oct 16, 2018
README.md Initial commit Oct 16, 2018
multi-action.workflow Initial commit Oct 16, 2018
single-action.workflow Add ref to actions/bin/bats Dec 12, 2018

README.md

Tools for building GitHub Actions

This repository contains actions that can be used to automate the testing, building, and deployment of custom GitHub Actions using workflows.

Workflows

Makefile

Adding automatic deployments to your Actions - Multi-Action

  1. Download the appropriate tar file from the releases page and copy it into your repository.
  2. Untar the copied file, creating a new set of Makefiles and configuration files in your repository.
  3. Copy action_template.mk into the sub-folder of each of your actions, and rename it to Makefile.
  4. For each of your actions, update the new Makefile to:
    1. Use the include directives for any of the helper files that make sense for your Action.
    2. Set the target depedencies for each of the default targets that make sense for your Action.
    3. Add any additional actions that you would like performed to the target definitions.
    4. If you leave everything for the target blank, it will be skipped, but don't delete it or you will get errors.
  5. Optionally: update your Makefile to represent the Docker image name that you would like. If none is specified the directory name will be used by default.
    1. Add IMAGE_NAME=<action_name> to each Action's Makefile. Replace <action_name with the name of the image to publish.

Actions

These have similar functionality to a number of top level actions. The key differences are that they aggregate some functionality, and include make.

GitHub Action for Shell

Tools for linting and testing shell scripts, as well as linting dockerfiles, using makefiles and dockerfile_lint.

Usage

An example workflow to run Dockerfile linting and with Google Cloud Platform and run the gcloud command:

workflow "Lint and Test Source" {
  on = "push"
  resolves = ["Test"]
}
 action "Lint" {
  uses = "actions/action-builder/shell@master"
  runs = "make"
  args = "lint"
}
 action "Test" {
  needs = "Lint"
  uses = "actions/action-builder/shell@master"
  runs = "make"
  args = "test"
}
 action "Build" {
  needs = ["Test", "Lint"]
  uses = "actions/action-builder/docker@master"
  runs = "make"
  args = "build"
}

GitHub Action for Docker

Tools for building, tagging and publishing Docker images.

Usage

Sample workflow that tests, builds, and tags a Docker image.

workflow "Test and Build Container" {
  on = "push"
  resolves = ["Build"]
}
 action "Lint" {
  uses = "actions/action-builder/shell@master"
  runs = "make"
  args = "lint"
}
 action "Test" {
  uses = "actions/action-builder/shell@master"
  runs = "make"
  args = "test"
}
 action "Build" {
  needs = ["Test", "Lint"]
  uses = "actions/action-builder/docker@master"
  runs = "make"
  args = "build"
}

License

MIT. Please see additional information in each subdirectory.