Skip to content

๐Ÿ–Š๏ธ CLI to generate a Markdown table from GitHub Actions metadata

License

Notifications You must be signed in to change notification settings

actions-ecosystem/describe-action

Folders and files

NameName
Last commit message
Last commit date

Latest commit

ย 

History

9 Commits
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 

Repository files navigation

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