Skip to content

A GitHub Action to generate helm-docs for a charts repo

License

Notifications You must be signed in to change notification settings

netfoundry/helm-docs-action

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

13 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

helm-docs GitHub Actions

A Github action for generating Helm module documentation using helm-docs . Fork from : https://github.com/norwoodj/helm-docs

Usage

name: Generate helm docs
on:
  - pull_request
jobs:
  docs:
    runs-on: ubuntu-latest
    steps:
    - uses: actions/checkout@v4
      with:
        ref: ${{ github.event.pull_request.head.ref }}

    - name: Render helm docs inside the README.md and push changes back to PR branch
      uses: shaybentk/[email protected]
      with:
        working-dir: mychart
        git-push: "true"

Inputs

Name Description Default Required
fail-on-diff Fail the job if there is any diff found between the generated output and existing file (ignored if git-push is set) false false
git-commit-message Commit message helm-docs: automated action false
git-push If true it will commit and push the changes false false
git-push-sign-off If true it will sign-off commit false false
git-push-user-email If empty the no-reply email of the GitHub Actions bot will be used (i.e. github-actions[bot]@users.noreply.github.com) "" false
git-push-user-name If empty the name of the GitHub Actions bot will be used (i.e. github-actions[bot]) "" false
output-file File in module directory where the docs should be placed README.md false
working-chart Name of directory to generate docs for . false
working-dir Comma separated list of directories to generate docs for . false

Auto commit changes

To enable you need to ensure a few things first:

  • set git-push to true
  • use actions/checkout@v4 with the head ref for PRs or branch name for pushes
    • PR

      on:
        - pull_request
      jobs:
        docs:
          runs-on: ubuntu-latest
          steps:
          - uses: actions/checkout@v4
            with:
              ref: ${{ github.event.pull_request.head.ref }}
    • Push

      on:
        push:
          branches:
            - master
      jobs:
        docs:
          runs-on: ubuntu-latest
          steps:
          - uses: actions/checkout@v4
            with:
              ref: master

Examples

Single folder

- name: Generate Helm Docs
  uses: shaybentk/[email protected]
  with:
    working-dir: mychart
    git-push: "true"

Multi folder

- name: Generate Helm Docs
  uses: shaybentk/[email protected]
  with:
    working-dir: mychart1,mychart2,mychart3
    git-push: "true"

About

A GitHub Action to generate helm-docs for a charts repo

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • Shell 83.4%
  • Dockerfile 16.6%