đź› A toolkit for building GitHub Actions in Node.js
MIT License
Bot releases are visible (Hide)
Published by JasonEtco over 5 years ago
Some improvements to the Toolkit#command
method:
Published by release-drafter[bot] over 5 years ago
Toolkit#command
, including better command matching and documentation.Published by JasonEtco over 5 years ago
This is the first beta release containing a new method, Toolkit#command
being worked on in #53. Still missing docs, but this beta release should help to test it out in real Actions.
Published by release-drafter[bot] over 5 years ago
A slightly customized instance of Signale, a great logging utility. You can use it in two ways: as tools.log()
, or by picking the particular method.
tools.log('Logging something amazing!')
tools.log.info('Here is some information!')
Signale will output your logs to the Actions UI with some icons to help identify your logs:
I'm interested in your feedback on this feature!
Published by release-drafter[bot] over 5 years ago
Some additional changes to the Signale PR #45 that allow for a callable tools.log
method:
tools.log('Hello!')
tools.log.info('Wow!')
Published by release-drafter[bot] over 5 years ago
This minor release (1.5.0) will include support for a logger - see #45 for the implementation! It's still missing documentation, hence the beta
prerelease. I wanted to try it out in some real actions first!
Some basic docs:
tools.log.METHOD
So:
tools.log.info('Omg wow!')
Published by release-drafter[bot] over 5 years ago
The biggest change in this release is #44, which changes the behavior added in #36 to be a lot less aggressive. Thanks @banyan ❤️
Published by release-drafter[bot] over 5 years ago
A collection of methods to end the action's process and tell GitHub what status to set (success, neutral or failure). Internally, these methods call process.exit
with the appropriate exit code. You can pass an optional message to each one to be logged before exiting. This can be used like an early return:
if (someCheck) tools.exit.neutral('No _action_ necessary!')
if (anError) tools.exit.failure('We failed!')
tools.exit.success('We did it team!')
Published by release-drafter[bot] over 5 years ago
Published by release-drafter[bot] over 5 years ago
Published by release-drafter[bot] over 5 years ago
Your actions can store information in a file that is passed to the next actions in a workflow. It's a modified instance of flat-cache
- note that the API is a little different:
tools.store.get('foo')
tools.store.set('foo', 'bar')
Published by release-drafter[bot] over 5 years ago
Published by release-drafter[bot] over 5 years ago
Bootstrap a new action by running the following:
npx actions-toolkit <name>
This will give you a Dockerfile and a .js
file with actions-toolkit
ready to go.
Published by release-drafter[bot] over 5 years ago
This release mostly centers around the Octokit client. It updates to a new major version of @octokit/rest
, which puts this library more in line with their docs.
tools.github.graphql
A pre-authenticated instance of @octokit/graphql
, for all your GraphQL needs!
tools.createOctokit()
=> tools.github
In practice, creating a new Octokit client isn't necessary 99% of the time, so this release changes it to be a single pre-authenticated instance.
// Before
const octokit = tools.createOctokit()
octokit.issues.create()
// After
tools.github.issues.create()
Published by release-drafter[bot] almost 6 years ago
All of the docs were moved out of the docs
folder, and into the README. This allows for better discoverability, and while its a little more work to maintain, it's a lot easier to control.
Published by release-drafter[bot] almost 6 years ago
You can now access the arguments passed to your action via toolkit.arguments
! This uses minimist
to parse the arguments into a nicely consumable object.
Published by JasonEtco almost 6 years ago