docs: add generated CLI help output to repo (#46)

Generate the help pages using `cobras` builtin functionality and commit
them to the repository. This gives users to ability to review the
options of `hcloud-upload-image` without having to install it first.
This commit is contained in:
Julian Tölle 2024-11-02 21:57:53 +01:00 committed by GitHub
parent b181eebd38
commit 4e24d83c7a
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
11 changed files with 188 additions and 18 deletions

View file

@ -30,7 +30,6 @@ jobs:
args: --timeout 5m
working-directory: hcloudimages
test:
runs-on: ubuntu-latest
steps:
@ -45,7 +44,6 @@ jobs:
- name: Run tests
run: go test -v -race -coverpkg=./...,./hcloudimages/... ./... ./hcloudimages/...
go-mod-tidy:
runs-on: ubuntu-latest
steps:
@ -65,3 +63,23 @@ jobs:
- if: failure()
run: echo "::error::Check failed, please run 'go mod tidy' and commit the changes."
cli-help-pages:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Set up Go
uses: actions/setup-go@v5
with:
go-version-file: go.mod
- name: Generate CLI help pages
run: go run ./scripts/cli-help-pages.go
- name: Check uncommitted changes
run: git diff --exit-code
- if: failure()
run: echo "::error::Check failed, please run 'go run ./scripts/cli-help-pages.go' and commit the changes."