Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

add job to check if docs are up to date #473

Merged
merged 3 commits into from
Sep 19, 2022
Merged
Show file tree
Hide file tree
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
21 changes: 21 additions & 0 deletions .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -78,6 +78,27 @@ jobs:
echo "Building snapshot..."
./build.sh

check-docs:
name: check-docs
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@2541b1294d2704b0964813337f33b291d3f8596b # v3
- uses: actions/setup-go@84cbf8094393cdc5fe1fe1671ff2647332956b1a # v3
with:
go-version-file: './go.mod'
check-latest: true

- name: generate docs
run: |
go build -o ct-bin ./ct/main.go
./ct-bin doc-gen
git_status="$(git status --porcelain)"
if [[ ${git_status} ]]; then
echo -e 'Documentation is outdated. Please update the docs\n'
echo "${git_status}"
exit 1
fi

golangci:
name: lint
runs-on: ubuntu-latest
Expand Down
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -5,3 +5,4 @@
/dist
/config.*
vendor
/ct-bin
2 changes: 2 additions & 0 deletions ct/cmd/root.go
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,8 @@ func NewRootCmd() *cobra.Command {
cmd.AddCommand(newVersionCmd())
cmd.AddCommand(newGenerateDocsCmd())

cmd.DisableAutoGenTag = true

return cmd
}

Expand Down
1 change: 0 additions & 1 deletion doc/ct.md
Original file line number Diff line number Diff line change
Expand Up @@ -26,4 +26,3 @@ in given chart directories.
* [ct list-changed](ct_list-changed.md) - List changed charts
* [ct version](ct_version.md) - Print version information

###### Auto generated by spf13/cobra on 23-Mar-2022
1 change: 0 additions & 1 deletion doc/ct_install.md
Original file line number Diff line number Diff line change
Expand Up @@ -78,4 +78,3 @@ ct install [flags]

* [ct](ct.md) - The Helm chart testing tool

###### Auto generated by spf13/cobra on 23-Mar-2022
1 change: 0 additions & 1 deletion doc/ct_lint-and-install.md
Original file line number Diff line number Diff line change
Expand Up @@ -77,4 +77,3 @@ ct lint-and-install [flags]

* [ct](ct.md) - The Helm chart testing tool

###### Auto generated by spf13/cobra on 23-Mar-2022
1 change: 0 additions & 1 deletion doc/ct_lint.md
Original file line number Diff line number Diff line change
Expand Up @@ -74,4 +74,3 @@ ct lint [flags]

* [ct](ct.md) - The Helm chart testing tool

###### Auto generated by spf13/cobra on 23-Mar-2022
1 change: 0 additions & 1 deletion doc/ct_list-changed.md
Original file line number Diff line number Diff line change
Expand Up @@ -32,4 +32,3 @@ ct list-changed [flags]

* [ct](ct.md) - The Helm chart testing tool

###### Auto generated by spf13/cobra on 23-Mar-2022
1 change: 0 additions & 1 deletion doc/ct_version.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,4 +16,3 @@ ct version [flags]

* [ct](ct.md) - The Helm chart testing tool

###### Auto generated by spf13/cobra on 23-Mar-2022