This action wraps action-docs to update action and workflow documentation. By default the action will update README.md
based on the action.yml
. See the parameters for changing the defaults.
The action will update your readme by replacing html comment tags. Add one of more tags based on the following template to your repo: <!-- action-docs-(header | description | inputs | outputs | runs | usage | all) source="action-file.yml" -->
to add the corresponding section.
header
: to add/update a header based on the name of the action/workflow (only added if action optionincludeNameHeader
is set to true)description
: to add/update a section with a descriptions of the action (applicable to actions only)inputs
: to add/update a section with inputs of the action/workflowoutputs
: to add/update a section with outputs of the action/workflowruns
: to add/update a section of the environment required to run (applicable to actions only)usage
: to add/update a section containing an example of how to call the action/workflow. This comment also requires passing a project and a version to use in the example e.g.<!-- action-docs-usage source="action-file.yml" project="npalm/action-docs" version="v2.3.0" -->
.all
: to include all of the above in order
In your workflow add the action, see below for the available parameters.
- uses: npalm/action-docs-action
The action will not commit any change, to ensure the changes are persisted you can use an action to commit or raise a pull request.
name | description | required | default |
---|---|---|---|
readme |
Readme file to update. |
false |
README.md |
actionFile |
The action definition file. |
false |
"" |
sourceFile |
The action or workflow definition file. |
false |
action.yml |
includeNameHeader |
Include the name header in the updated readme. |
false |
true |
tocLevel |
TOC level used for the headers. The |
false |
2 |
lineBreaks |
Line breaks to be used in updated readme (LF, CR or CRLF). |
false |
LF |
This action is a node20
action.
This project are released under the MIT License.