Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
17 changes: 13 additions & 4 deletions .github/workflows/update-cli-docs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ on:
workflow_dispatch:
inputs:
kosli_cli_tag:
description: 'CLI release tag (e.g. v2.11.2)'
description: 'CLI release tag (vX.Y.Z)'
required: true
repository_dispatch:
types: [cli-release]
Expand Down Expand Up @@ -78,9 +78,18 @@ jobs:
https://github.com/kosli-dev/cli.git /tmp/cli-repo
cd /tmp/cli-repo && git sparse-checkout set charts/k8s-reporter
cd /tmp/cli-repo/charts/k8s-reporter
helm-docs --template-files MINTLIFY.md.gotmpl,_templates.gotmpl,_mintlify_templates.gotmpl
mkdir -p $GITHUB_WORKSPACE/helm
cp /tmp/cli-repo/charts/k8s-reporter/README.md $GITHUB_WORKSPACE/helm/k8s_reporter.mdx
mkdir -p $GITHUB_WORKSPACE/helm/k8s_reporter
rm -f $GITHUB_WORKSPACE/helm/k8s_reporter/*.mdx
for tmpl in mintlify/*.md.gotmpl; do
page=$(basename "$tmpl" .md.gotmpl)
helm-docs \
--template-files "${tmpl},_templates.gotmpl,_mintlify_templates.gotmpl" \
--output-file "${page}.generated.md"
# helm-docs leaves a trailing blank line; normalize to a single final newline
printf '%s\n' "$(cat "${page}.generated.md")" \
> "$GITHUB_WORKSPACE/helm/k8s_reporter/${page}.mdx"
rm "${page}.generated.md"
done

- name: Create Pull Request
uses: peter-evans/create-pull-request@v8
Expand Down