-
Notifications
You must be signed in to change notification settings - Fork 7
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
ci: add github action to check if helm docs is updated
- Loading branch information
1 parent
e65afe6
commit 17d81bb
Showing
2 changed files
with
44 additions
and
1 deletion.
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,43 @@ | ||
name: Check Helm Docs | ||
|
||
on: | ||
pull_request: | ||
paths: | ||
- 'charts/**' # Only trigger on changes to charts | ||
|
||
jobs: | ||
check-helm-docs: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout repository | ||
uses: actions/checkout@v3 | ||
|
||
- name: Set up Go environment | ||
uses: actions/setup-go@v4 | ||
with: | ||
go-version: '1.23' # Ensure you have a suitable Go version | ||
|
||
- name: Install helm-docs | ||
run: | | ||
go install github.com/norwoodj/helm-docs/cmd/helm-docs@latest | ||
- name: Run helm-docs | ||
run: | | ||
helm-docs | ||
- name: Check for uncommitted changes | ||
run: | | ||
git diff --exit-code | ||
continue-on-error: true | ||
id: git_diff | ||
|
||
- name: Fail if helm-docs changes were needed | ||
if: steps.git_diff.outcome == 'failure' | ||
run: | | ||
echo "::error::helm-docs was not applied or is outdated" | ||
exit 1 | ||
- name: Success message | ||
if: steps.git_diff.outcome == 'success' | ||
run: | | ||
echo "helm-docs is up-to-date" |
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