diff --git a/.github/workflows/lint.yaml b/.github/workflows/lint.yaml index 8d37e3ea5..a16a52326 100644 --- a/.github/workflows/lint.yaml +++ b/.github/workflows/lint.yaml @@ -6,6 +6,43 @@ permissions: contents: read jobs: + docs-up-to-date: + name: Docs Up To Date + runs-on: ubuntu-22.04 + steps: + - name: Checkout + uses: actions/checkout@v4 + with: + ref: ${{ github.event.pull_request.head.ref }} + + - name: Install Helm Docs + uses: envoy/install-helm-docs@v1.0.0 + with: + version: 1.11.0 + + - name: Update Helm Docs + run: | + set -ex + helm-docs + + - name: Check for changes in generated Helm docs models (helm-docs) + run: | + ./scripts/helm-docs.sh + changed=$(git status -s -uno | wc -l) + echo -e "### Git status" >> $GITHUB_STEP_SUMMARY + if [[ "$changed" -gt 0 ]]; then + echo "Generating helm-docs" + helm-docs + + git config --global user.name "testkube-cloud-ci-bot" + git config --global user.email "testkube-cloud-ci-bot@users.noreply.github.com" + git add **/*README.md + git commit -m "Updating helm-chart versions and README files" + git push + else + echo "Docs are up to date" + fi + exit $changed chart-test: name: Chart lint runs-on: ubuntu-22.04