-
Notifications
You must be signed in to change notification settings - Fork 7
43 lines (35 loc) · 1.04 KB
/
helm-docs.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
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"