From 2db580a51385c26a356ace9b511d0878955c5444 Mon Sep 17 00:00:00 2001 From: Ricardo Katz Date: Sun, 16 Jan 2022 22:49:11 -0300 Subject: [PATCH] fix helmdoc push shell script (#8152) --- .github/workflows/helm.yaml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/helm.yaml b/.github/workflows/helm.yaml index 7545e5d66c..0dd7188469 100644 --- a/.github/workflows/helm.yaml +++ b/.github/workflows/helm.yaml @@ -68,8 +68,8 @@ jobs: 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 + DIFF=$(git diff ${GITHUB_WORKSPACE}/charts/ingress-nginx/README.md) + if [ ! -z "$DIFF" ]; 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