-
Notifications
You must be signed in to change notification settings - Fork 92
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* clean up ci jobs Signed-off-by: cpanato <[email protected]> * update dependabot config Signed-off-by: cpanato <[email protected]> * add makefile and job to check helm docs Signed-off-by: cpanato <[email protected]> --------- Signed-off-by: cpanato <[email protected]>
- Loading branch information
Showing
5 changed files
with
78 additions
and
6 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 |
---|---|---|
@@ -1,6 +1,12 @@ | ||
--- | ||
version: 2 | ||
updates: | ||
- package-ecosystem: "github-actions" | ||
directory: "/" | ||
schedule: | ||
interval: "weekly" | ||
groups: | ||
actions: | ||
update-types: | ||
- "minor" | ||
- "patch" |
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,29 @@ | ||
name: Check Helm Docs | ||
|
||
on: | ||
pull_request: | ||
paths: | ||
- "charts/**" | ||
|
||
jobs: | ||
readme: | ||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- name: Checkout repository | ||
uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7 | ||
|
||
- name: Run Helm Docs and check the outcome | ||
run: | | ||
make docs | ||
exit_code=$(git diff --exit-code) | ||
exit ${exit_code} | ||
- name: Print a comment in case of failure | ||
run: | | ||
echo "The README.md files 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 |
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
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
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,40 @@ | ||
DOCS_IMAGE_VERSION="v1.14.2" | ||
|
||
CHART_TESTING_IMAGE_VERSION="v3.10.1" | ||
|
||
# Charts's path relative to the current directory. | ||
CHARTS := $(wildcard ./charts/*) | ||
|
||
CHARTS_NAMES := $(notdir $(CHARTS)) | ||
|
||
.PHONY: lint | ||
lint: helm-deps-update $(addprefix lint-, $(CHARTS_NAMES)) | ||
|
||
lint-%: | ||
@docker run \ | ||
-it \ | ||
-e HOME=/home/ct \ | ||
--mount type=tmpfs,destination=/home/ct \ | ||
--workdir=/data \ | ||
--volume $$(pwd):/data \ | ||
-u $$(id -u) \ | ||
quay.io/helmpack/chart-testing:$(CHART_TESTING_IMAGE_VERSION) \ | ||
ct lint --config ./ct.yaml --charts ./charts/$* | ||
|
||
.PHONY: docs | ||
docs: $(addprefix docs-, $(CHARTS_NAMES)) | ||
|
||
docs-%: | ||
@docker run \ | ||
--rm \ | ||
--workdir=/helm-docs \ | ||
--volume "$$(pwd):/helm-docs" \ | ||
-u $$(id -u) \ | ||
jnorwood/helm-docs:$(DOCS_IMAGE_VERSION) \ | ||
helm-docs -c ./charts/$* -t ./README.md.gotmpl -o ./README.md | ||
|
||
.PHONY: helm-deps-update | ||
helm-deps-update: $(addprefix helm-deps-update-, $(CHARTS_NAMES)) | ||
|
||
helm-deps-update-%: | ||
helm dependency update ./charts/$* |