From f35bc673506ebc1addeedd3f1dc98959d2a697cd Mon Sep 17 00:00:00 2001 From: Pavan Nambi <92514129+Pavan-Nambi@users.noreply.github.com> Date: Fri, 7 Jul 2023 15:19:46 +0530 Subject: [PATCH] refractor(helm-docs task):to make it execute only once (#439) * refractor(helm-docs task):to make it execute only once update(#439) update * Update .github/workflows/ci.yaml --------- Co-authored-by: Jintao Zhang --- .github/workflows/ci.yaml | 42 ++++++++++++++++++++++++--------------- 1 file changed, 26 insertions(+), 16 deletions(-) diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml index 9b7b46f7..e0c3219f 100644 --- a/.github/workflows/ci.yaml +++ b/.github/workflows/ci.yaml @@ -9,15 +9,40 @@ on: jobs: + helm_docs: + name: Check the Helm Docs format + runs-on: ubuntu-20.04 + steps: + - name: Checkout + uses: actions/checkout@v2 + with: + submodules: recursive + + - name: Setup Go + uses: actions/setup-go@v3 + with: + go-version: '1.19.2' + + - name: Run helm-docs + run: | + GOBIN=$PWD GO111MODULE=on go install github.com/norwoodj/helm-docs/cmd/helm-docs@v1.11.0 + ./helm-docs --chart-search-root=${GITHUB_WORKSPACE}/charts + DIFF=$(git diff ${GITHUB_WORKSPACE}/charts/**/*md) + if [ ! -z "$DIFF" ]; then + echo "Please use helm-docs in your clone, of your fork, of the project, and commit an updated README.md for the chart." + fi + git diff --exit-code + rm -f ./helm-docs + helm: name: Helm chart runs-on: ubuntu-20.04 + needs: helm_docs strategy: matrix: k8s: ["v1.16.15@sha256:64bac16b83b6adfd04ea3fbcf6c9b5b893277120f2b2cbf9f5fa3e5d4c2260cc", "v1.17.17@sha256:e477ee64df5731aa4ef4deabbafc34e8d9a686b49178f726563598344a3898d5", "v1.18.20@sha256:e3dca5e16116d11363e31639640042a9b1bd2c90f85717a7fc66be34089a8169", "v1.19.16@sha256:81f552397c1e6c1f293f967ecb1344d8857613fb978f963c30e907c32f598467", "v1.20.15@sha256:393bb9096c6c4d723bb17bceb0896407d7db581532d11ea2839c80b28e5d8deb", "v1.21.10@sha256:84709f09756ba4f863769bdcabe5edafc2ada72d3c8c44d6515fc581b66b029c", "v1.22.7@sha256:1dfd72d193bf7da64765fd2f2898f78663b9ba366c2aa74be1fd7498a1873166", "v1.23.4@sha256:0e34f0d0fd448aa2f2819cfd74e99fe5793a6e4938b328f657c8e3f81ee0dfb9"] steps: - - name: Checkout uses: actions/checkout@v2 with: @@ -69,18 +94,3 @@ jobs: && ct install \ --charts charts/apisix' - - name: Setup Go - uses: actions/setup-go@v3 - with: - go-version: '1.19.2' - - - name: Run helm-docs - run: | - GOBIN=$PWD GO111MODULE=on go install github.com/norwoodj/helm-docs/cmd/helm-docs@v1.11.0 - ./helm-docs --chart-search-root=${GITHUB_WORKSPACE}/charts - DIFF=$(git diff ${GITHUB_WORKSPACE}/charts/**/*md) - if [ ! -z "$DIFF" ]; then - echo "Please use helm-docs in your clone, of your fork, of the project, and commit a updated README.md for the chart." - fi - git diff --exit-code - rm -f ./helm-docs \ No newline at end of file