Skip to content

linkorb/core-exo-actions

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

54 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Core Exo Actions

This project provides a set of common reusable actions for Exo

Installation

git clone [email protected]:linkorb/core-exo-actions.git
cd core-exo-actions
composer install # Installs the Exo CLI tool in vendor/bin + any PHP dependencies required by the actions in this repo
cp .env.dist .env
edit .env

Usage

# list actions
vendor/bin/exo action

# get action details
vendor/bin/exo action random-number

# run an action
vendor/bin/exo run random-number -i min=10 -i max=100

# run action as a full json input/output request
vendor/bin/exo request < actions/random-number/example.request.json

Creating new Exo actions

Create a new directory for your action in actions/ (i.e. actions/my-action/) and add a file called exo.action.yaml.

As a starting point, you can copy one of the exo.action.yaml files from an existing action, and modify it to your requirements.

Then add a file that contains your action code. This can be a .php, .rb, .js, .sh, etc file, as long as it takes a JSON request on STDIN, and outputs a JSON response on STDOUT.

The request and response JSON should validate against the corresponding JSON schema: https://github.com/linkorb/exo/tree/master/schema

About

Library of reusable common actions to use with https://github.com/linkorb/exo

Resources

Code of conduct

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published