GithubHelp home page GithubHelp logo

stingaa / action-builder Goto Github PK

View Code? Open in Web Editor NEW
0.0 0.0 28.0 17 KB

A collection of GitHub Actions that can be used to automate the testing, building, and deployment of custom GitHub Actions using workflows

License: MIT License

HCL 29.05% Makefile 55.14% Dockerfile 15.81%

action-builder's Introduction

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.

action-builder's People

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.