Package: github-actions-docs
github-actions-docsGenerates documentations for github actions and reusable workflows.FeaturesSupports reusable workflows.Highly customizable usage section.Inline tags for more flexibility.For reusable workflows as they all should be under.github/workflows, one single
readme file will be generated for every reusable workflows under that directory.Commenting# Example: <value>format, In thedescriptionpart of the inputs
section will result in<value>being picked up as the default value of the
respecting parameter in the usage section. Otherwise the value would be empty
or equal to thedefault:.Installationpipinstallgithub-actions-docsUsagegithub-actions-docs.github/actions/example/action.yaml# Creates or updates .github/actions/example/README.mdgithub-actions-docs.github/actions/example/action.yaml--verbose--dry-run--show-diff# Does not save anything on the disk and shows the diff between what would have# been generated comparing to .github/actions/example/README.mdgithub-actions-docs.github/workflows/*.yaml# Creates or updates .github/workflows/README.mdAs a pre-commit hookCheckpre-commitfor further information.Sample.pre-commit-config.yaml-repo:https://github.com/rzjfr/github-actions-docsrev:0.2.4hooks:-id:generate-gh-actions-docsOptionsgithub-actions-docs--help#positional arguments:#  input_files_path      Path (or glob) of github action or reusable workflow file(s).##options:#  -h, --help            show this help message and exit#  --version             show program's version number and exit#  --verbose             More verbosity in logging. (default: False)#  --dry-run             Show content of the generated docs instead of writing it. (default: False)#  --show-diff           Show diff between existing file and the newly generated one. (default: False)#  --ignore              Silently ignore invalid files. (default: False)#  --tag-prefix          Prefix used for the tags in the output. (default: GH_DOCS)#  --output-mode         Method of output to file. (default: inject) Possible values: [replace, inject]#  --generation-mode     Whether to create tags inline or only a pair of tags. (default: inline) Possible values: [inline, block]#  --docs-filename       Creates or updates output on the same path as the input. (default: README.md)#  --usage-ref-override  Override the uses reference in usage section. By default latest tag or current branch name will be used.Generation modeA markdown file will be generated and injected based on a predefined template. You
can create your own template by addingtagsdirectly to your
readme file. Each tag will be replaced by a pair ofBEGINandENDtags enclosing
the corresponding content. That's the inline mode.If the comment tags are too noisy, you can change thegeneration-modeto the block
mode in which only a pair of comment tags will be used to designate the entire
generated section.Full list of tagstag namecorresponding yaml pathdescriptiontype<!-- GH_DOCS_NAME -->.nameName of the workflow or actionboth<!-- GH_DOCS_DESCRIPTION -->.descriptionDescription of the workflow or action defaults to file path in workflowsboth<!-- GH_DOCS_RUNS -->.runsonly for actionsType of the action, in workflows it defaults toreusable workflowconstantboth<!-- GH_DOCS_INPUTS -->.inputsfor actions and.on.workflow_call.inputsfor reusable workflowsboth<!-- GH_DOCS_OUTPUTS -->.outputsfor actions and.on.workflow_call.outputsfor reusable workflowsboth<!-- GH_DOCS_SECRETS -->.on.workflow_call.secretsfor reusable workflowsreusable workflows<!-- GH_DOCS_TITLE -->NATop level header for the reusable workflows, defaults toReusable Workflowsreusable workflows<!-- GH_DOCS_CONTENTS_TABLE_TITLE -->NAHeader of table of contents, defaults toList of workflowsreusable workflows<!-- GH_DOCS_CONTENTS_TABLE_ITEM -->NAContent of the table of contents, created dynamically.reusable workflows<!-- GH_DOCS_USAGE -->NACreates simple usage block. Check--usage-ref-overrideboth