From 0e5d4ad425cf519f7c674a16b9e8bda523b2566e Mon Sep 17 00:00:00 2001 From: Ricardo Katz Date: Sun, 16 Jan 2022 22:25:28 -0300 Subject: [PATCH] Automatically generate helm docs (#8151) --- .github/workflows/ci.yaml | 7 ------- .github/workflows/helm.yaml | 20 ++++++++++++++++++++ charts/ingress-nginx/values.yaml | 2 +- 3 files changed, 21 insertions(+), 8 deletions(-) diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml index 0d9ba2ad2..62843b1d7 100644 --- a/.github/workflows/ci.yaml +++ b/.github/workflows/ci.yaml @@ -137,13 +137,6 @@ jobs: run: | ./build/run-in-docker.sh ./hack/verify-chart-lint.sh - - name: Run helm-docs - run: | - GOBIN=$PWD GO111MODULE=on go install github.com/norwoodj/helm-docs/cmd/helm-docs@v1.6.0 - ./helm-docs --chart-search-root=${GITHUB_WORKSPACE}/charts - git diff --exit-code - rm -f ./helm-docs - - name: fix permissions run: | sudo mkdir -p $HOME/.kube diff --git a/.github/workflows/helm.yaml b/.github/workflows/helm.yaml index a99fcfaa6..7545e5d66 100644 --- a/.github/workflows/helm.yaml +++ b/.github/workflows/helm.yaml @@ -56,6 +56,26 @@ jobs: run: | git config --global user.name "$GITHUB_ACTOR" git config --global user.email "$GITHUB_ACTOR@users.noreply.github.com" + + - name: Set up Go 1.17 + id: go + uses: actions/setup-go@v2 + with: + go-version: 1.17 + + - name: Run helm-docs + run: | + cd ${GITHUB_WORKSPACE} + GOBIN=$PWD GO111MODULE=on go install github.com/norwoodj/helm-docs/cmd/helm-docs@v1.6.0 + ./helm-docs --chart-search-root=${GITHUB_WORKSPACE}/charts + git diff --exit-code ${GITHUB_WORKSPACE}/charts/ingress-nginx/README.md + if [ $? -ne 0 ]; then + git add ${GITHUB_WORKSPACE}/charts/ingress-nginx/README.md + git commit -m "Update helm README" + git push --quiet https://x-access-token:${GITHUB_TOKEN}@github.com/${GITHUB_REPOSITORY}.git main > /dev/null 2>&1 + fi + rm ./helm-docs + - name: Run chart-releaser uses: helm/chart-releaser-action@v1.2.1 diff --git a/charts/ingress-nginx/values.yaml b/charts/ingress-nginx/values.yaml index d30c170b6..778951098 100644 --- a/charts/ingress-nginx/values.yaml +++ b/charts/ingress-nginx/values.yaml @@ -34,7 +34,7 @@ controller: # -- Configures the controller container name containerName: controller - # -- Configures the ports the nginx-controller listens on + # -- Configures the ports that the nginx-controller listens on containerPort: http: 80 https: 443