From 881484162e6e9a686f4a97994a5e916c2477fa57 Mon Sep 17 00:00:00 2001 From: David Collom Date: Fri, 17 Nov 2023 11:16:58 +0000 Subject: [PATCH] Switching Workflow to generate ourselves --- .github/workflows/helm-test.yaml | 37 ++++++++++++++++++++++++++------ 1 file changed, 30 insertions(+), 7 deletions(-) diff --git a/.github/workflows/helm-test.yaml b/.github/workflows/helm-test.yaml index 34826217..aa080c02 100644 --- a/.github/workflows/helm-test.yaml +++ b/.github/workflows/helm-test.yaml @@ -27,25 +27,48 @@ jobs: - run: helm lint deploy/charts/version-checker docs: + name: Generate Helm Docs runs-on: ubuntu-latest + permissions: + contents: write steps: - uses: actions/checkout@v3 with: ref: ${{ github.event.pull_request.head.ref }} - - uses: dorny/paths-filter@v2 + - name: Check for values.yaml changes + uses: dorny/paths-filter@v2 id: filter with: filters: | values: - 'deploy/charts/version-checker/values.yaml' - - # Only run if the values.yaml file has changed. - - name: Render helm docs inside the README.md and push changes back to PR branch + - name: Install Helm Docs if: steps.filter.outputs.values == 'true' - uses: shaybentk/helm-docs-action@v0.0.1 + uses: envoy/install-helm-docs@v1.0.0 with: - working-dir: deploy/charts/version-checker - git-push: "true" + version: 1.11.0 + - name: Update Helm Docs + run: | + set -ex + cd deploy/charts/version-checker + helm-docs + - name: Check for README.md changes + uses: dorny/paths-filter@v2 + id: filter-readme + with: + base: HEAD + filters: | + readme: + - 'deploy/charts/version-checker/README.md' + - name: Commit Helm Docs + if: steps.filter-readme.outputs.readme == 'true' + run: | + set -ex + git config --local user.email "github-actions[bot]@users.noreply.github.com" + git config --local user.name "github-actions[bot]" + git add deploy/charts/version-checker + git commit -m "[HELM] Update helm docs" + git push test: