Skip to content

Commit

Permalink
ci: Check generated metrics docs
Browse files Browse the repository at this point in the history
Signed-off-by: Anna Kapuscinska <[email protected]>
  • Loading branch information
lambdanis committed Feb 20, 2024
1 parent 58fc00c commit e28c7c7
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 0 deletions.
3 changes: 3 additions & 0 deletions .github/workflows/generated-files.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -43,3 +43,6 @@ jobs:
git status --porcelain
echo "Please run 'make generate-flags' and submit your changes'"; exit 1
fi
- name: Check metrics docs
run: |
make lint-metrics-md
7 changes: 7 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -427,3 +427,10 @@ metrics-docs: tetra
echo 'weight: 4' >> $(METRICS_DOCS_PATH)
echo '---' >> $(METRICS_DOCS_PATH)
$(CONTAINER_ENGINE) run --rm -v $(PWD):$(PWD) -w $(PWD) $(GO_IMAGE) ./tetra metrics-docs tetragon >> $(METRICS_DOCS_PATH)

.PHONY: lint-metrics-md
lint-metrics-md: metrics-docs
@if [ -n "$$(git status --porcelain $(METRICS_DOCS_PATH))" ]; then \
echo "metrics doc out of sync; please run 'make metrics-docs'" > /dev/stderr; \
false; \
fi

0 comments on commit e28c7c7

Please sign in to comment.