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
52 changes: 52 additions & 0 deletions .github/workflows/check-helm-docs.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,52 @@
name: Check Helm Docs

# Fails when charts/flyte-binary/README.md is out of date with the chart's
# values.yaml / Chart.yaml. The README is generated by helm-docs, so this guards
# against contributors editing values without regenerating the docs.
#
# helm-docs is installed via `go install` (not the prebuilt release binary) on
# purpose: the release binary bakes in a version string and therefore appends an
# "Autogenerated from chart metadata using helm-docs" footer, while `go install`
# leaves the version empty and omits it. The committed README has no footer, so
# CI must generate it the same way to stay reproducible.

on:
pull_request:
types: [opened, synchronize, reopened]
branches:
- main
paths:
- 'charts/flyte-binary/**'
- '.github/workflows/check-helm-docs.yml'

permissions:
contents: read

env:
HELM_DOCS_VERSION: v1.8.0

jobs:
check-helm-docs:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v4

- name: Set up Go
uses: actions/setup-go@v5
with:
go-version-file: go.mod

- name: Install helm-docs
run: go install "github.com/norwoodj/helm-docs/cmd/helm-docs@${HELM_DOCS_VERSION}"

- name: Regenerate chart README
run: helm-docs --chart-search-root=charts/flyte-binary

- name: Verify README is up to date
run: |
if ! git diff --exit-code -- charts/flyte-binary/README.md; then
echo "::error::charts/flyte-binary/README.md is out of date."
echo "Run 'helm-docs --chart-search-root=charts/flyte-binary' (helm-docs ${HELM_DOCS_VERSION}) and commit the result."
exit 1
fi
Loading