-
Notifications
You must be signed in to change notification settings - Fork 21
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
GDB-9455: Added automatic readme generation with helm-docs
- Added readme Go template used as a base for generating the readme with helm-docs - Added new workflow that invokes helm-docs and pushes changes back to the PR
- Loading branch information
1 parent
4fc137c
commit fe712cb
Showing
3 changed files
with
495 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
name: Continuous Integration | ||
|
||
on: | ||
pull_request: | ||
|
||
env: | ||
HELM_DOCS_IMAGE: "jnorwood/helm-docs:v1.13.1@sha256:717bd8f770bd1d25ccf79c876f1420e105832f2d6bbde12170405f58f540cb2d" | ||
|
||
jobs: | ||
documentation: | ||
name: Generate readme | ||
runs-on: ubuntu-22.04 | ||
timeout-minutes: 5 | ||
steps: | ||
- id: checkout_repository | ||
name: Checkout repository | ||
# actions/checkout@v4.1.1 | ||
uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 | ||
with: | ||
ref: ${{ github.event.pull_request.head.ref }} | ||
|
||
- id: generate_helm_docs | ||
name: Generate Helm chart readme with helm-docs | ||
run: | | ||
docker run --rm --volume "$(pwd):/helm-docs" -u "$(id -u)" $HELM_DOCS_IMAGE | ||
- id: update_pull_request | ||
name: Update PR with readme changes | ||
run: | | ||
if ! git diff --exit-code; then | ||
git config --local user.name 'github-actions[bot]' | ||
git config --local user.email 'github-actions[bot]@users.noreply.github.com' | ||
git commit -am "Updated the README" | ||
git push | ||
else | ||
echo "Readme is up to date, nothing to push..." | ||
fi |
Oops, something went wrong.