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