gh-action-readme

command module
v0.6.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Oct 23, 2025 License: MIT Imports: 1 Imported by: 0

README ΒΆ

gh-action-readme

GitHub Release GitHub Release Date GitHub go.mod Go version GitHub License ci

A GitHub CLI extension to inject GitHub Actions metadata into README.md markdown files.

[!TIP] Do you need to manage multiple actions in a github-actions monorepo? Check out the How to Manage Monorepos with Multiple Actions documentation for more information.

Prerequisites

⚑️ Quick Start

Install the gh-action-readme extension

The gh-action-readme extension can be installed using the following command.

gh extension install reakaleek/gh-action-readme
Create a README.md file

Create a README.md file in the action directory containing the action.yml file.

You can use the following template to define the metadata placeholders.

# <!--name--><!--/name-->
<!--description-->

## Inputs
<!--inputs-->
Update the README.md file

Run the following command to update the README.md file with the metadata from the action.yml file.

gh action-readme update
That's it! πŸŽ‰

The README.md file will be updated with the metadata from the action.yml file.

-# <!--name--><!--/name-->
+# <!--name-->Awesome Action<!--/name-->
<!--description-->
+A GitHub Action that does something awesome.
+Something that is very useful.
+<!--/description-->

## Inputs
<!--inputs-->
+| Name   | Description     | Required | Default   |
+|--------|-----------------|----------|-----------|
+| input1 | The first input | `true`   | `default` |
+<!--/inputs-->

Checkout the documentation for more information on how to use the gh-action-readme extension.

[!NOTE] Using gh-action-readme as a pre-commit hook does not require you to install the gh-action-readme extension in github cli.

You can also use the gh-action-readme extension as a pre-commit hook to automatically update the README.md file before committing changes.

Add the following configuration to the .pre-commit-config.yaml file.

repos:
  - repo: https://github.com/reakaleek/gh-action-readme
    rev: v0.5.0
    hooks:
      - id: action-readme

Then run the following command to install the pre-commit hook.

pre-commit install

[!TIP] You can use the pre-commit action to run the pre-commit checks in your GitHub Actions workflow.

GitHub Actions Monorepo Support

The action-readme pre-commit supports monorepos with multiple actions in a single repository. It will automatically detect the action.yml files in the repository and update the corresponding README.md files.

.
β”œβ”€β”€ action-a/
β”‚   β”œβ”€β”€ action.yml
β”‚   └── README.md
β”œβ”€β”€ action-b/
β”‚   β”œβ”€β”€ action.yml
β”‚   └── README.md
└── some/
    └── folder/
        └── action-c/
            β”œβ”€β”€ action.yml
            └── README.md

Documentation ΒΆ

The Go Gopher

There is no documentation for this package.

Directories ΒΆ

Path Synopsis
cmd
internal

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL