DEV Community

Mike Coutermarsh
Mike Coutermarsh

Posted on

Getting started with GitHub Actions? Try Actions Toolkit

If you're writing your own Actions using Node.js. Save yourself some time and take a look at Actions Toolkit. Jason is collecting common tasks and extracting them to a single module you can use to build your Actions.

GitHub logo JasonEtco / actions-toolkit

πŸ›  A toolkit for building GitHub Actions in Node.js

GitHub Actions Toolkit

An opinionated toolkit for building GitHub Actions in Node.js
Usage β€’ API β€’ How to test your Action β€’ FAQ

GitHub Actions status Codecov

This toolkit is an opinionated alternative to (and wrapper around) the official toolkit. actions/toolkit makes many features optional in the interest of performance, so you may prefer to use it instead of this library.

Usage

Installation

$ npm install actions-toolkit
const { Toolkit } = require('actions-toolkit')
const tools = new Toolkit()

Bootstrap a new action

$ npx actions-toolkit my-cool-action

This will create a new folder my-cool-action with the following files:

β”œβ”€β”€ Dockerfile
β”œβ”€β”€ action.yml
β”œβ”€β”€ index.js
β”œβ”€β”€ index.test.js
└── package.json

API

Toolkit options

event (optional)

An optional list…

Top comments (2)

Collapse
Β 
itsjoekent profile image
Joe Kent β€’

I've used this already, definitely recommend!

Collapse
Β 
lannonbr profile image
Benjamin Lannon β€’

For those of us who are used to working in JS environments, using actions-toolkit by Jason has made working with actions much easier.