From e4f005968f1025daff37a2019b9796dcf98a3f0e Mon Sep 17 00:00:00 2001 From: OAharoni-RedHat Date: Thu, 9 Jul 2026 16:23:02 -0400 Subject: [PATCH] add new helm-docs auto push action --- .github/workflows/helm-docs.yaml | 43 ++++++++++++++++++++++++++++++++ 1 file changed, 43 insertions(+) create mode 100644 .github/workflows/helm-docs.yaml diff --git a/.github/workflows/helm-docs.yaml b/.github/workflows/helm-docs.yaml new file mode 100644 index 0000000..784ea19 --- /dev/null +++ b/.github/workflows/helm-docs.yaml @@ -0,0 +1,43 @@ +name: helm-docs + +on: + push: + branches: + - main + +jobs: + helm-docs: + runs-on: ubuntu-latest + permissions: + contents: write + + steps: + - name: Checkout + uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6 + with: + ref: ${{ github.head_ref || github.ref_name }} + persist-credentials: true + + - name: Install helm-docs + run: | + HELM_DOCS_VERSION=$(curl -sSL https://api.github.com/repos/norwoodj/helm-docs/releases/latest | grep '"tag_name"' | sed 's/.*"v\([^"]*\)".*/\1/') + echo "Installing helm-docs v${HELM_DOCS_VERSION}" + curl -sSL "https://github.com/norwoodj/helm-docs/releases/download/v${HELM_DOCS_VERSION}/helm-docs_${HELM_DOCS_VERSION}_Linux_x86_64.tar.gz" \ + | tar -xz helm-docs + sudo mv helm-docs /usr/local/bin/helm-docs + helm-docs --version + + - name: Run helm-docs + run: helm-docs + + - name: Commit updated README + run: | + git config user.name "github-actions[bot]" + git config user.email "41898282+github-actions[bot]@users.noreply.github.com" + git add README.md + if git diff --cached --quiet; then + echo "No changes to commit." + else + git commit -m "docs: update helm chart README via helm-docs [skip ci]" + git push + fi