Skip to content

npalm/action-docs-action

Use this GitHub action with your project
Add this Action to an existing workflow or create a new one
View on Marketplace

Repository files navigation

action-docs-action status

Action to update GitHub Action documentation

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.

Usage

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 option includeNameHeader 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/workflow
  • outputs: to add/update a section with outputs of the action/workflow
  • runs: 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.

Inputs

name description required default
readme

Readme file to update.

false README.md
actionFile

The action definition file.
Deprecated: This input is replaced by sourceFile

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 includeNameHeader input is influecing the TOC level, setting includeNameHeader to true will increase the TOC level by 1.

false 2
lineBreaks

Line breaks to be used in updated readme (LF, CR or CRLF).

false LF

Runs

This action is a node20 action.

License

This project are released under the MIT License.