diff --git a/.github/workflows/chart-doc.yaml b/.github/workflows/chart-doc.yaml index 249220fe..06e82c12 100644 --- a/.github/workflows/chart-doc.yaml +++ b/.github/workflows/chart-doc.yaml @@ -20,19 +20,22 @@ jobs: with: version: v3.6.3 + - name: install Just + uses: extractions/setup-just@v2 + - name: Install helm-docs env: - version: 1.5.0 + HELM_DOCS_VERSION: 1.13.1 run: | - echo "Installing helm-docs version $version" - curl -L -o helm-docs.tar.gz https://github.com/norwoodj/helm-docs/releases/download/v${version}/helm-docs_${version}_Linux_x86_64.tar.gz - tar -xzvf helm-docs.tar.gz helm-docs - rm -rf helm-docs.tar.gz + just setup + + - name: Install Quarto + uses: quarto-dev/quarto-actions/setup@v2 + with: + version: pre-release - - name: Run helm-docs - run: | - ./helm-docs --chart-search-root=charts --template-files=README.md.gotmpl --template-files=./_templates.gotmpl - ./helm-docs --chart-search-root=other-charts --template-files=README.md.gotmpl --template-files=./_templates.gotmpl + - name: Render Quarto Project + uses: quarto-dev/quarto-actions/render@v2 - name: Commit results run: | @@ -62,13 +65,12 @@ jobs: with: version: v3.6.3 + - name: install Just + uses: extractions/setup-just@v2 + - name: Compute and update dependent files run: | - set -xe - cd ./charts/rstudio-launcher-rbac && helm dependency build && cd - - helm template -n rstudio rstudio-launcher-rbac ./charts/rstudio-launcher-rbac --set removeNamespaceReferences=true > examples/rbac/rstudio-launcher-rbac.yaml - CHART_VERSION=$(helm show chart ./charts/rstudio-launcher-rbac | grep '^version' | cut -d ' ' -f 2) - cp examples/rbac/rstudio-launcher-rbac.yaml examples/rbac/rstudio-launcher-rbac-${CHART_VERSION}.yaml + just rbac - name: Commit results run: | diff --git a/Justfile b/Justfile index a4a5cf76..0dde53a6 100644 --- a/Justfile +++ b/Justfile @@ -1,13 +1,16 @@ DIFF := "diff" +HELM_DOCS_VERSION := env_var_or_default("HELM_DOCS_VERSION", "1.13.1") +OS := if os() == "macos" {"Darwin"} else if os() == "linux" {"Linux"} else if os() == "windows" {"Windows"} else {""} +ARCH := if arch() == "aarch64" {"arm64"} else if arch() == "x86_64" {"x86_64"} else {""} setup: #!/bin/bash - # TODO: idempotency - - # TODO: check for macos - mkdir -p ./bin/helm-docs-1.5.0/ - curl -L https://github.com/norwoodj/helm-docs/releases/download/v1.5.0/helm-docs_1.5.0_Darwin_x86_64.tar.gz | tar -xzvf - -C ./bin/helm-docs-1.5.0/ - ln -s $PWD/bin/helm-docs-1.5.0/helm-docs $PWD/bin/helm-docs + set -xe + echo "Installing helm-docs version {{HELM_DOCS_VERSION}}" + mkdir -p bin + curl -L -s https://github.com/norwoodj/helm-docs/releases/download/v{{HELM_DOCS_VERSION}}/helm-docs_{{HELM_DOCS_VERSION}}_{{OS}}_{{ARCH}}.tar.gz -o bin/helm-docs.tar.gz + tar -C ./bin -xz -f bin/helm-docs.tar.gz helm-docs + rm -rf bin/helm-docs.tar.gz update-lock: #!/bin/bash diff --git a/_quarto.yml b/_quarto.yml index 11cd7a54..8554e84c 100644 --- a/_quarto.yml +++ b/_quarto.yml @@ -1,8 +1,8 @@ project: type: posit-docs pre-render: | - ./helm-docs --chart-search-root=charts --template-files=README.md.gotmpl --template-files=./_templates.gotmpl - ./helm-docs --chart-search-root=other-charts --template-files=README.md.gotmpl --template-files=./_templates.gotmpl + ./bin/helm-docs --chart-search-root=charts --template-files=README.md.gotmpl --template-files=./_templates.gotmpl + ./bin/helm-docs --chart-search-root=other-charts --template-files=README.md.gotmpl --template-files=./_templates.gotmpl render: - charts/rstudio-workbench/README.md - charts/rstudio-workbench/NEWS.md