DEV Community

loading...

Getting started with GitHub Actions? Try Actions Toolkit

mscccc profile image Mike Coutermarsh ・1 min read

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…

Discussion (2)

pic
Editor guide
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.