/describe-action

🖊️ CLI to generate a Markdown table from GitHub Actions metadata

Primary LanguageGoApache License 2.0Apache-2.0

Describe Action

actions-workflow-test release pkg.go.dev license

A CLI to generate a Markdown table from GitHub Actions metadata inputs and outputs in action.yml.

Installation

$ go get github.com/actions-ecosystem/describe-action/cmd/describe-action

Usage

$ describe-action -h
Usage of describe-action:
  -input
        Whether only print inputs
  -output
        Whether only print outputs
  -type
        Whether table has types
  -yaml string
        The filepath to action.yml (default "action.yml")

Example

$ describe-action --yaml testdata/action.yml --input
|      NAME      |                         DESCRIPTION                          | REQUIRED |          DEFAULT           |
|----------------|--------------------------------------------------------------|----------|----------------------------|
| `github_token` | A GitHub token.                                              | `true`   | `N/A`                      |
| `repo`         | The owner and repository name. e.g.) Codertocat/Hello-World. | `false`  | `${{ github.repository }}` |
$ describe-action --yaml testdata/action.yml --input --type
? Type of "inputs.github_token": string
? Type of "inputs.repo": string
|      NAME      |                         DESCRIPTION                          |   TYPE   | REQUIRED |          DEFAULT           |
|----------------|--------------------------------------------------------------|----------|----------|----------------------------|
| `github_token` | A GitHub token.                                              | `string` | `true`   | `N/A`                      |
| `repo`         | The owner and repository name. e.g.) Codertocat/Hello-World. | `string` | `false`  | `${{ github.repository }}` |

References