github-action-readme-generator
Version:
This is a CLI tool and GitHub Action that reads in the details from a GitHub Action's `action.yml` file and updates the `README.md` file with the `name`, `description`, `usage`, `inputs`, `outputs`, and examples of the action. Configuration can be provid
14 lines (13 loc) • 861 B
TypeScript
/**
* This code exports a function named 'save' which takes an instance of the 'Inputs' class as its parameter.
* The function reads the configuration inputs from the 'inputs' parameter and uses them to create a new instance of the 'GHActionDocsConfig' class.
* If the 'save' property is set to true in the configuration inputs, the function saves the configuration to the file specified in the 'configPath' property of the 'inputs' parameter.
* This script is used to update the usage section in the README.md file to match the contents of the action.yml file.
*/
import Inputs from './inputs.js';
import LogTask from './logtask/index.js';
/**
* This script rebuilds the usage section in the README.md to be consistent with the action.yml
* @param {Inputs} inputs - the inputs class
*/
export default function save(inputs: Inputs, log: LogTask): void;