Giter Site home page Giter Site logo

losisin / helm-docs-github-action Goto Github PK

View Code? Open in Web Editor NEW
2.0 2.0 0.0 2.41 MB

Install helm-docs tool and auto-generate markdown documentation from Helm charts

License: MIT License

Smarty 8.08% TypeScript 85.44% Shell 6.48%
documentation gh-actions github-actions helm helm-chart helm-charts helm-docs markdown

helm-docs-github-action's People

Contributors

dependabot[bot] avatar github-actions[bot] avatar losisin avatar

Stargazers

 avatar  avatar

Watchers

 avatar  avatar  avatar

helm-docs-github-action's Issues

Some help needed

Hi, thanks for the action.

I've incorporated it into this repo - https://github.com/damianoneill/helm-charts/blob/main/.github/workflows/helm-docs.yaml

When a job runs, https://github.com/damianoneill/helm-charts/actions/runs/7228221283/job/19697266869

Run losisin/[email protected]
Downloading helm-docs v1.[11](https://github.com/damianoneill/helm-charts/actions/runs/7228221283/job/19697266869#step:3:12).3
helm-docs binary 'v1.11.3' has been cached at /opt/hostedtoolcache/helm-docs/1.11.3/x64/helm-docs
/opt/hostedtoolcache/helm-docs/1.11.3/x64/helm-docs --values-file values.yaml --output-file README.md --chart-search-root ./charts
time="2023-12-[15](https://github.com/damianoneill/helm-charts/actions/runs/7228221283/job/19697266869#step:3:17)T23:53:21Z" level=info msg="Found Chart directories [base]"
time="2023-12-15T23:53:21Z" level=info msg="Generating README Documentation for chart charts/base"
'README.md' is up to date.

But I can see that this is not up to date, if I run manually.

➜  helm-charts git:(main) helm-docs --values-file values.yaml --output-file README.md --chart-search-root ./charts
INFO[2023-12-16T00:00:59Z] Found Chart directories [base]
INFO[2023-12-16T00:00:59Z] Generating README Documentation for chart charts/base
➜  helm-charts git:(main) ✗ git status
On branch main
Your branch is up to date with 'origin/main'.

Changes not staged for commit:
  (use "git add <file>..." to update what will be committed)
  (use "git restore <file>..." to discard changes in working directory)
	modified:   charts/base/README.md

no changes added to commit (use "git add" and/or "git commit -a")
➜  helm-charts git:(main) ✗

And the changes

diff --git a/charts/base/README.md b/charts/base/README.md
index 0adcf39..256de37 100644
--- a/charts/base/README.md
+++ b/charts/base/README.md
@@ -1,8 +1,8 @@
 # base

-![Version: 0.1.2](https://img.shields.io/badge/Version-0.1.2-informational?style=flat-square) ![Type: application](https://img.shields.io/badge/Type-application-informational?style=flat-square) ![AppVersion: 1.0.0](https://img.shields.io/badge/AppVersion-1.0.0-informational?style=flat-square)
+![Version: 0.1.3](https://img.shields.io/badge/Version-0.1.3-informational?style=flat-square) ![Type: application](https://img.shields.io/badge/Type-application-informational?style=flat-square) ![AppVersion: 1.0.0](https://img.shields.io/badge/AppVersion-1.0.0-informational?style=flat-square)

-A Helm chart for Kubernetes
+A subchart for REST based Microservices

 ## Maintainers

(END)

Any suggestions much appreciated. Thanks.

Help with git-push

Hey, I'm just starting out with helm-docs. I set up your action with this config:

name: Generate Helm docs
on:
  - pull_request
jobs:
  generate:
    runs-on: ubuntu-latest
    steps:
    - uses: actions/checkout@v4
      with:
        ref: ${{ github.event.pull_request.head.ref }}
    - name: Run helm-docs
      uses: losisin/helm-docs-github-action@v1
      with:
        git-push: true

It seems to do the right thing, gives this output:

2024-05-02T19:32:24.6638395Z Current runner version: '2.316.0'
2024-05-02T19:32:24.6662671Z ##[group]Operating System
2024-05-02T19:32:24.6663259Z Ubuntu
2024-05-02T19:32:24.6663586Z 22.04.4
2024-05-02T19:32:24.6664013Z LTS
2024-05-02T19:32:24.6664347Z ##[endgroup]
2024-05-02T19:32:24.6664763Z ##[group]Runner Image
2024-05-02T19:32:24.6665262Z Image: ubuntu-22.04
2024-05-02T19:32:24.6665621Z Version: 20240422.1.0
2024-05-02T19:32:24.6666620Z Included Software: https://github.com/actions/runner-images/blob/ubuntu22/20240422.1/images/ubuntu/Ubuntu2204-Readme.md
2024-05-02T19:32:24.6668122Z Image Release: https://github.com/actions/runner-images/releases/tag/ubuntu22%2F20240422.1
2024-05-02T19:32:24.6668956Z ##[endgroup]
2024-05-02T19:32:24.6669368Z ##[group]Runner Image Provisioner
2024-05-02T19:32:24.6669926Z 2.0.369.1
2024-05-02T19:32:24.6670234Z ##[endgroup]
2024-05-02T19:32:24.6672573Z ##[group]GITHUB_TOKEN Permissions
2024-05-02T19:32:24.6674233Z Actions: write
2024-05-02T19:32:24.6674951Z Attestations: write
2024-05-02T19:32:24.6675435Z Checks: write
2024-05-02T19:32:24.6675793Z Contents: write
2024-05-02T19:32:24.6676256Z Deployments: write
2024-05-02T19:32:24.6676649Z Discussions: write
2024-05-02T19:32:24.6677035Z Issues: write
2024-05-02T19:32:24.6677465Z Metadata: read
2024-05-02T19:32:24.6677824Z Packages: write
2024-05-02T19:32:24.6678204Z Pages: write
2024-05-02T19:32:24.6678641Z PullRequests: write
2024-05-02T19:32:24.6679048Z RepositoryProjects: write
2024-05-02T19:32:24.6679536Z SecurityEvents: write
2024-05-02T19:32:24.6680017Z Statuses: write
2024-05-02T19:32:24.6680522Z ##[endgroup]
2024-05-02T19:32:24.6683926Z Secret source: Actions
2024-05-02T19:32:24.6684686Z Prepare workflow directory
2024-05-02T19:32:24.7304581Z Prepare all required actions
2024-05-02T19:32:24.7461865Z Getting action download info
2024-05-02T19:32:24.9031996Z Download action repository 'actions/checkout@v4' (SHA:0ad4b8fadaa221de15dcec353f45205ec38ea70b)
2024-05-02T19:32:25.3373107Z Download action repository 'losisin/helm-docs-github-action@v1' (SHA:b72493a335c652b54567acb35e277010638f02dc)
2024-05-02T19:32:25.8502570Z Complete job name: generate
2024-05-02T19:32:25.9462192Z ##[group]Run actions/checkout@v4
2024-05-02T19:32:25.9462821Z with:
2024-05-02T19:32:25.9463167Z   ref: helm_readme
2024-05-02T19:32:25.9463725Z   repository: djjudas21/charts
2024-05-02T19:32:25.9464469Z   token: ***
2024-05-02T19:32:25.9464872Z   ssh-strict: true
2024-05-02T19:32:25.9465382Z   ssh-user: git
2024-05-02T19:32:25.9465807Z   persist-credentials: true
2024-05-02T19:32:25.9466251Z   clean: true
2024-05-02T19:32:25.9466762Z   sparse-checkout-cone-mode: true
2024-05-02T19:32:25.9467292Z   fetch-depth: 1
2024-05-02T19:32:25.9467655Z   fetch-tags: false
2024-05-02T19:32:25.9468152Z   show-progress: true
2024-05-02T19:32:25.9468591Z   lfs: false
2024-05-02T19:32:25.9468931Z   submodules: false
2024-05-02T19:32:25.9469443Z   set-safe-directory: true
2024-05-02T19:32:25.9469916Z ##[endgroup]
2024-05-02T19:32:26.1776910Z Syncing repository: djjudas21/charts
2024-05-02T19:32:26.1779316Z ##[group]Getting Git version info
2024-05-02T19:32:26.1780191Z Working directory is '/home/runner/work/charts/charts'
2024-05-02T19:32:26.1781246Z [command]/usr/bin/git version
2024-05-02T19:32:26.1812276Z git version 2.43.2
2024-05-02T19:32:26.1836983Z ##[endgroup]
2024-05-02T19:32:26.1853614Z Temporarily overriding HOME='/home/runner/work/_temp/89160a01-c846-45e0-85a9-64452740f5d7' before making global git config changes
2024-05-02T19:32:26.1854845Z Adding repository directory to the temporary git global config as a safe directory
2024-05-02T19:32:26.1859231Z [command]/usr/bin/git config --global --add safe.directory /home/runner/work/charts/charts
2024-05-02T19:32:26.1892387Z Deleting the contents of '/home/runner/work/charts/charts'
2024-05-02T19:32:26.1900065Z ##[group]Initializing the repository
2024-05-02T19:32:26.1903432Z [command]/usr/bin/git init /home/runner/work/charts/charts
2024-05-02T19:32:26.1976353Z hint: Using 'master' as the name for the initial branch. This default branch name
2024-05-02T19:32:26.1978404Z hint: is subject to change. To configure the initial branch name to use in all
2024-05-02T19:32:26.1979474Z hint: of your new repositories, which will suppress this warning, call:
2024-05-02T19:32:26.1980297Z hint: 
2024-05-02T19:32:26.1980856Z hint: 	git config --global init.defaultBranch <name>
2024-05-02T19:32:26.1981473Z hint: 
2024-05-02T19:32:26.1982525Z hint: Names commonly chosen instead of 'master' are 'main', 'trunk' and
2024-05-02T19:32:26.1983780Z hint: 'development'. The just-created branch can be renamed via this command:
2024-05-02T19:32:26.1984500Z hint: 
2024-05-02T19:32:26.1984991Z hint: 	git branch -m <name>
2024-05-02T19:32:26.1987026Z Initialized empty Git repository in /home/runner/work/charts/charts/.git/
2024-05-02T19:32:26.1997657Z [command]/usr/bin/git remote add origin https://github.com/djjudas21/charts
2024-05-02T19:32:26.2035532Z ##[endgroup]
2024-05-02T19:32:26.2036408Z ##[group]Disabling automatic garbage collection
2024-05-02T19:32:26.2038306Z [command]/usr/bin/git config --local gc.auto 0
2024-05-02T19:32:26.2066847Z ##[endgroup]
2024-05-02T19:32:26.2067640Z ##[group]Setting up auth
2024-05-02T19:32:26.2071612Z [command]/usr/bin/git config --local --name-only --get-regexp core\.sshCommand
2024-05-02T19:32:26.2100455Z [command]/usr/bin/git submodule foreach --recursive sh -c "git config --local --name-only --get-regexp 'core\.sshCommand' && git config --local --unset-all 'core.sshCommand' || :"
2024-05-02T19:32:26.2454101Z [command]/usr/bin/git config --local --name-only --get-regexp http\.https\:\/\/github\.com\/\.extraheader
2024-05-02T19:32:26.2483723Z [command]/usr/bin/git submodule foreach --recursive sh -c "git config --local --name-only --get-regexp 'http\.https\:\/\/github\.com\/\.extraheader' && git config --local --unset-all 'http.https://github.com/.extraheader' || :"
2024-05-02T19:32:26.2720414Z [command]/usr/bin/git config --local http.https://github.com/.extraheader AUTHORIZATION: basic ***
2024-05-02T19:32:26.2755373Z ##[endgroup]
2024-05-02T19:32:26.2756883Z ##[group]Fetching the repository
2024-05-02T19:32:26.2766418Z [command]/usr/bin/git -c protocol.version=2 fetch --no-tags --prune --no-recurse-submodules --depth=1 origin +refs/heads/helm_readme*:refs/remotes/origin/helm_readme* +refs/tags/helm_readme*:refs/tags/helm_readme*
2024-05-02T19:32:26.7112585Z From https://github.com/djjudas21/charts
2024-05-02T19:32:26.7114272Z  * [new branch]      helm_readme -> origin/helm_readme
2024-05-02T19:32:26.7151207Z ##[endgroup]
2024-05-02T19:32:26.7154932Z ##[group]Determining the checkout info
2024-05-02T19:32:26.7156417Z [command]/usr/bin/git branch --list --remote origin/helm_readme
2024-05-02T19:32:26.7181851Z   origin/helm_readme
2024-05-02T19:32:26.7191982Z ##[endgroup]
2024-05-02T19:32:26.7197034Z [command]/usr/bin/git sparse-checkout disable
2024-05-02T19:32:26.7239936Z [command]/usr/bin/git config --local --unset-all extensions.worktreeConfig
2024-05-02T19:32:26.7267869Z ##[group]Checking out the ref
2024-05-02T19:32:26.7272070Z [command]/usr/bin/git checkout --progress --force -B helm_readme refs/remotes/origin/helm_readme
2024-05-02T19:32:26.7410521Z Switched to a new branch 'helm_readme'
2024-05-02T19:32:26.7412054Z branch 'helm_readme' set up to track 'origin/helm_readme'.
2024-05-02T19:32:26.7418577Z ##[endgroup]
2024-05-02T19:32:26.7454534Z [command]/usr/bin/git log -1 --format='%H'
2024-05-02T19:32:26.7477785Z '11a11f477bc152918a09890cf7f11f770762cbf1'
2024-05-02T19:32:26.7766852Z ##[group]Run losisin/helm-docs-github-action@v1
2024-05-02T19:32:26.7767372Z with:
2024-05-02T19:32:26.7767640Z   git-push: true
2024-05-02T19:32:26.7768088Z   chart-search-root: .
2024-05-02T19:32:26.7768455Z   values-file: values.yaml
2024-05-02T19:32:26.7768792Z   output-file: README.md
2024-05-02T19:32:26.7769265Z   git-push-user-name: github-actions[bot]
2024-05-02T19:32:26.7769841Z   git-push-user-email: github-actions[bot]@users.noreply.github.com
2024-05-02T19:32:26.7770421Z   git-commit-message: update Helm documentation
2024-05-02T19:32:26.7770932Z   fail-on-diff: false
2024-05-02T19:32:26.7771510Z ##[endgroup]
2024-05-02T19:32:26.8690192Z ##[group]Downloading helm-docs v1.13.1
2024-05-02T19:32:27.1875278Z [command]/usr/bin/tar xz --warning=no-unknown-keyword --overwrite -C /home/runner/work/_temp/1911ed2f-f44e-41ff-876a-7606c136575f -f /home/runner/work/_temp/5c9f2467-05de-4e9f-9e07-0286eca9ddb3
2024-05-02T19:32:27.2588300Z ##[endgroup]
2024-05-02T19:32:27.2593059Z helm-docs binary 'v1.13.1' has been cached at /opt/hostedtoolcache/helm-docs/1.13.1/x64/helm-docs
2024-05-02T19:32:27.2611382Z [command]/opt/hostedtoolcache/helm-docs/1.13.1/x64/helm-docs --values-file values.yaml --output-file README.md --chart-search-root .
2024-05-02T19:32:27.2690822Z time="2024-05-02T19:32:27Z" level=info msg="Found Chart directories [charts/autonodelabel, charts/dbdump, charts/ecowitt-exporter, charts/graphite-exporter, charts/hammond, charts/homer, charts/joplin-server, charts/jump, charts/liturgical-colour, charts/lldap, charts/navidrome, charts/nova-exporter, charts/openssh-server, charts/owncloud, charts/photoprism, charts/smtp-relay, charts/uptime-kuma, charts/webtrees]"
2024-05-02T19:32:27.2744369Z time="2024-05-02T19:32:27Z" level=info msg="Generating README Documentation for chart charts/photoprism"
2024-05-02T19:32:27.2746490Z time="2024-05-02T19:32:27Z" level=info msg="Generating README Documentation for chart charts/dbdump"
2024-05-02T19:32:27.2753153Z time="2024-05-02T19:32:27Z" level=info msg="Generating README Documentation for chart charts/liturgical-colour"
2024-05-02T19:32:27.2760581Z time="2024-05-02T19:32:27Z" level=info msg="Generating README Documentation for chart charts/hammond"
2024-05-02T19:32:27.2762472Z time="2024-05-02T19:32:27Z" level=info msg="Generating README Documentation for chart charts/smtp-relay"
2024-05-02T19:32:27.2765160Z time="2024-05-02T19:32:27Z" level=info msg="Generating README Documentation for chart charts/homer"
2024-05-02T19:32:27.2770193Z time="2024-05-02T19:32:27Z" level=info msg="Generating README Documentation for chart charts/autonodelabel"
2024-05-02T19:32:27.2776715Z time="2024-05-02T19:32:27Z" level=info msg="Generating README Documentation for chart charts/lldap"
2024-05-02T19:32:27.2784487Z time="2024-05-02T19:32:27Z" level=info msg="Generating README Documentation for chart charts/joplin-server"
2024-05-02T19:32:27.2790807Z time="2024-05-02T19:32:27Z" level=info msg="Generating README Documentation for chart charts/nova-exporter"
2024-05-02T19:32:27.2806670Z time="2024-05-02T19:32:27Z" level=info msg="Generating README Documentation for chart charts/jump"
2024-05-02T19:32:27.2808548Z time="2024-05-02T19:32:27Z" level=info msg="Generating README Documentation for chart charts/graphite-exporter"
2024-05-02T19:32:27.2815047Z time="2024-05-02T19:32:27Z" level=info msg="Generating README Documentation for chart charts/navidrome"
2024-05-02T19:32:27.2817091Z time="2024-05-02T19:32:27Z" level=info msg="Generating README Documentation for chart charts/ecowitt-exporter"
2024-05-02T19:32:27.2836526Z time="2024-05-02T19:32:27Z" level=info msg="Generating README Documentation for chart charts/openssh-server"
2024-05-02T19:32:27.2838520Z time="2024-05-02T19:32:27Z" level=info msg="Generating README Documentation for chart charts/uptime-kuma"
2024-05-02T19:32:27.2839712Z time="2024-05-02T19:32:27Z" level=info msg="Generating README Documentation for chart charts/owncloud"
2024-05-02T19:32:27.2852818Z time="2024-05-02T19:32:27Z" level=info msg="Generating README Documentation for chart charts/webtrees"
2024-05-02T19:32:27.7192698Z Pushed 'README.md' to the branch.
2024-05-02T19:32:27.7833860Z Post job cleanup.
2024-05-02T19:32:27.8589779Z [command]/usr/bin/git version
2024-05-02T19:32:27.8632373Z git version 2.43.2
2024-05-02T19:32:27.8679802Z Temporarily overriding HOME='/home/runner/work/_temp/dbf35cbe-10b0-4050-b830-f2292122b78a' before making global git config changes
2024-05-02T19:32:27.8681855Z Adding repository directory to the temporary git global config as a safe directory
2024-05-02T19:32:27.8686560Z [command]/usr/bin/git config --global --add safe.directory /home/runner/work/charts/charts
2024-05-02T19:32:27.8727485Z [command]/usr/bin/git config --local --name-only --get-regexp core\.sshCommand
2024-05-02T19:32:27.8761762Z [command]/usr/bin/git submodule foreach --recursive sh -c "git config --local --name-only --get-regexp 'core\.sshCommand' && git config --local --unset-all 'core.sshCommand' || :"
2024-05-02T19:32:27.9016657Z [command]/usr/bin/git config --local --name-only --get-regexp http\.https\:\/\/github\.com\/\.extraheader
2024-05-02T19:32:27.9039293Z http.https://github.com/.extraheader
2024-05-02T19:32:27.9052365Z [command]/usr/bin/git config --local --unset-all http.https://github.com/.extraheader
2024-05-02T19:32:27.9084302Z [command]/usr/bin/git submodule foreach --recursive sh -c "git config --local --name-only --get-regexp 'http\.https\:\/\/github\.com\/\.extraheader' && git config --local --unset-all 'http.https://github.com/.extraheader' || :"
2024-05-02T19:32:27.9568646Z Cleaning up orphan processes

However, I never see a new commit on that branch. Have you got any hints on how to debug this? When I run helm-docs by hand, it does make changes to the README files, so there is definitely something to be committed. Thanks

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.