Skip to content

Commit

Permalink
new(CI): enforce the helm docs
Browse files Browse the repository at this point in the history
Signed-off-by: Aldo Lacuku <aldo@lacuku.eu>
  • Loading branch information
alacuku committed Feb 6, 2024
1 parent 2f56b9e commit 6151737
Showing 1 changed file with 38 additions and 0 deletions.
38 changes: 38 additions & 0 deletions .github/workflows/docs.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
name: Check Helm Docs

on:
pull_request:

jobs:
readme:
runs-on: ubuntu-latest

steps:
- name: Checkout repository
uses: actions/checkout@v2

- name: Set up Docker
uses: docker/setup-docker@v2

- name: Run Helm Docs and check the outcome
run: |
for chart in event-generator falco k8s-metacollector; do
docker run \
--rm \
--workdir=/helm-docs \
--volume "$(pwd):/helm-docs" \
-u $(id -u) \
jnorwood/helm-docs:v1.11.0 \
helm-docs -c ./charts/$chart -t ./README.gotmpl -o ./README.md
done
exit_code=$(git diff --exit-code)
exit ${exit_code}
- name: Print a comment in case of failure
run: |
echo "The README.md filer are not up to date.
Please, run make docs before pushing."
exit 1
if: |
failure() && github.event.pull_request.head.repo.full_name == github.repository

0 comments on commit 6151737

Please sign in to comment.