I’ve published a new GitHub Action called action-setup-ecctl (View on Marketplace). The action installs a specific version of ecctl (Elastic Cloud control tool) and cache it on the runner.

Usage

Inputs

ParameterRequiredDefault ValueDescription
versionfalselatestEcctl tool version such as v1.0.0-beta3. Ecctl vesion can be found here.

Supported Environments: Linux and macOS

Outputs

ParameterDescription
ecctl-pathecctl command path

Sample Workflow

A specific version of ecctl can be setup by giving an input - version like this: {% raw %}

- uses: yokawasa/action-setup-ecctl@v0.1.0
  with:
    version: 'v1.0.0-beta3'   # default is 'latest'
  id: setup
- run: |
  ecctl version  

{% endraw %}

The latest version of ecctl will be setup if you don’t give an input like this:

{% raw %}

- uses: yokawasa/action-setup-ecctl@v0.1.0
  id: setup
- run: |
  ecctl version  

{% endraw %}

Developing the action

Install the dependencies

npm install

Build the typescript and package it for distribution by running ncc

npm run build && npm run pack

Finally push the resutls

git add dist
git commit -a -m "prod dependencies"
git push origin releases/v0.1.0

Enjoy the action!