Skip to content

Commit

Permalink
feat: add more options
Browse files Browse the repository at this point in the history
  • Loading branch information
sethyates committed Mar 22, 2023
1 parent f20dc55 commit c8eaec4
Show file tree
Hide file tree
Showing 4 changed files with 59 additions and 10 deletions.
1 change: 0 additions & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -6,4 +6,3 @@ FROM alpine:3.17
COPY docker-entrypoint.sh /docker-entrypoint.sh
COPY --from=builder /go/bin/helm-docs /usr/local/bin/helm-docs
ENTRYPOINT ["/docker-entrypoint.sh"]
CMD ["."]
15 changes: 11 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,14 +9,21 @@ To use the GitHub Action, add the following to your job:
```yaml
- uses: conventional-actions/helm-docs@v1
with:
chart: charts/foobar
chart-search-root: ./charts/foobar
```
### Inputs
| Name | Default | Description |
|---------------|----------|--------------------|
| `chart` | `.` | Chart directory |
| Name | Default | Description |
|---------------------|--------------------|-----------------------------------------------------------------------------------------------------|
| `chart-search-root` | `.` | directory to search recursively within for charts |
| `badge-style` | `flat-square` | badge style to use for charts |
| `ignore-file` | `.helmdocsignore` | The filename to use as an ignore file to exclude chart directories |
| `log-level` | `info` | Level of logs that should printed, one of (panic, fatal, error, warning, info, debug, trace) |
| `output-file` | `README.md` | markdown file path relative to each chart directory to which rendered documentation will be written |
| `sort-values-order` | `alphanum` | order in which to sort the values table ("alphanum" or "file") |
| `template-files` | `README.md.gotmpl` | gotemplate file paths relative to each chart directory from which documentation will be generated |
| `values-file` | `values.yaml` | Path to values file |

### Outputs

Expand Down
51 changes: 47 additions & 4 deletions action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,15 +2,58 @@ name: 'helm-docs'
description: 'Run Helm Docs'
author: 'Conventional Actions'
inputs:
chart:
chart-search-root:
description: 'directory to search recursively within for charts'
required: false
description: 'Path to the chart directory'
default: .
default: '.'
badge-style:
description: 'badge style to use for charts'
required: false
default: 'flat-square'
ignore-file:
description: 'The filename to use as an ignore file to exclude chart directories'
required: false
default: '.helmdocsignore'
log-level:
description: 'Level of logs that should printed, one of (panic, fatal, error, warning, info, debug, trace)'
required: false
default: 'info'
output-file:
description: 'markdown file path relative to each chart directory to which rendered documentation will be written'
required: false
default: "README.md"
sort-values-order:
description: 'order in which to sort the values table ("alphanum" or "file")'
required: false
default: "alphanum"
template-files:
description: 'gotemplate file paths relative to each chart directory from which documentation will be generated'
required: false
default: 'README.md.gotmpl'
values-file:
description: 'Path to values file'
required: false
default: "values.yaml"
runs:
using: 'docker'
image: 'Dockerfile'
args:
- ${{ inputs.chart }}
- "-c"
- "${{ inputs.chart }}"
- "-b"
- "${{ inputs.badge-style }}"
- "-i"
- "${{ inputs.ignore-file }}"
- "-l"
- "${{ inputs.log-level }}"
- "-o"
- "${{ inputs.output-file }}"
- "-s"
- "${{ inputs.sort-values-order }}"
- "-t"
- "${{ inputs.template-files }}"
- "-f"
- "${{ inputs.values-file }}"
branding:
icon: hash
color: purple
2 changes: 1 addition & 1 deletion docker-entrypoint.sh
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
#!/usr/bin/env sh

helm-docs $*
helm-docs "$*"

0 comments on commit c8eaec4

Please sign in to comment.