Skip to content

Commit

Permalink
ci(helm-docs): fix diff issue in GitHub action check (#362)
Browse files Browse the repository at this point in the history
  • Loading branch information
aslafy-z authored Nov 15, 2024
1 parent e0f7e01 commit 2c97270
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 7 deletions.
9 changes: 6 additions & 3 deletions .github/workflows/pull_request.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -81,10 +81,13 @@ jobs:
- uses: actions/checkout@v4
with:
ref: ${{github.event.pull_request.head.sha}}
- name: Run helm-docs and check diff
- name: Run helm-docs
uses: losisin/helm-docs-github-action@57d2dc9379d9f0d5d22d2845a62c935d32cddfe2 # v1.3.3
with:
output-file: ./README.md
# Keep args in sync with /.pre-commit-config.yaml
output-file: ./../README.md
template-files: ./README.md.gotmpl
sort-values-order: file
fail-on-diff: true
- name: Check diff
run: |
git diff --exit-code README.md || { echo; echo "error: README.md is out of date. Please run `make build-docs` and commit the resulting file."; exit 1; }
3 changes: 1 addition & 2 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,7 @@ repos:
hooks:
- id: helm-docs-built
args:
- --chart-search-root=.
- --values-file=values.yaml
# Keep args in sync with /.github/workflows/pull_request.yaml
- --output-file=./../README.md
- --template-files=./README.md.gotmpl
- --sort-values-order=file
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -390,6 +390,7 @@ helm delete --namespace test my-application
| backup.snapshotVolumes | bool | `true` | Whether to take snapshots of persistent volumes as part of the backup. |
| backup.storageLocation | string | `nil` | Name of the backup storage location where the backup should be stored. |
| backup.ttl | string | `"1h0m0s"` | How long the Backup should be retained for. |
| backup.includedNamespaces | tpl/list | `[ {{ include "application.namespace" $ }} ]` | List of namespaces to include objects from. |
| backup.includedResources | list | `nil` | List of resource types to include in the backup. |
| backup.excludedResources | list | `nil` | List of resource types to exclude from the backup. |

Expand Down
2 changes: 0 additions & 2 deletions README.md.gotmpl
Original file line number Diff line number Diff line change
Expand Up @@ -30,8 +30,6 @@ helm delete --namespace test my-application

{{ template "chart.valuesSection" . }}

{{ template "helm-docs.versionFooter" . }}

## Naming convention for ConfigMap, Secret, SealedSecret and ExternalSecret

Name format of ConfigMap, Secret, SealedSecret and ExternalSecret is `{{`{{ template "application.name" $ }}-{{ $nameSuffix }}`}}` then:
Expand Down

0 comments on commit 2c97270

Please sign in to comment.