Code Monkey home page Code Monkey logo

action-docs-action's Introduction

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.

action-docs-action's People

Contributors

dependabot[bot] avatar jeroenknoops avatar larmitage-bjss avatar npalm avatar semantic-release-bot avatar semantic-releaser[bot] avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

action-docs-action's Issues

Error: Cannot read properties of undefined (reading 'replace')

Hi!

I'm getting the following error when running this action from a workflow:
Error: Cannot read properties of undefined (reading 'replace')

I'm not getting any other specific details, so I'm not sure what the exact issue may by.

Here is an example of what is being passed to the action:

with:
    sourceFile: .github/actions/build/action.yml
    readme: .github/actions/build/README.md
    includeNameHeader: true
    tocLevel: 1
    lineBreaks: LF

The source and readme values are pointing to actions within the repository that are being fed in from tj-actions/changed-files. I am able to cat both of these files in a previous step and see their contents. Is this action expecting a different path?

Thanks for any guidance!

Support multiple actions in single repo

I'm storing multiple actions in a single repo for simplicity.
I'd like to be able to run this action on multiple subdirectories.
Preferably by searching recursively for action.yaml/action.yaml file.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.