-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathaction.yml
More file actions
47 lines (46 loc) · 1.46 KB
/
action.yml
File metadata and controls
47 lines (46 loc) · 1.46 KB
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
44
45
46
47
name: helmdoc scan
description: Install a published helmdoc release and run helmdoc scan against a Helm chart.
inputs:
chart-path:
description: Path to the Helm chart to analyze.
required: true
version:
description: Released helmdoc tag to install; use latest to resolve the newest GitHub Release.
required: false
default: latest
output:
description: Scan output format to request from helmdoc (text or json).
required: false
default: text
min-score:
description: Optional minimum acceptable grade (A, B, C, D, or F).
required: false
default: ""
config:
description: Optional path to a .helmdoc.yaml policy file.
required: false
default: ""
runs:
using: composite
steps:
- name: Install helmdoc release
shell: bash
run: |
set -euo pipefail
"${GITHUB_ACTION_PATH}/scripts/install-helmdoc-release.sh" --version "${{ inputs.version }}"
- name: Run helmdoc scan
shell: bash
run: |
set -euo pipefail
args=("scan" "${{ inputs.chart-path }}")
if [[ -n "${{ inputs.output }}" ]]; then
args+=("--output" "${{ inputs.output }}")
fi
if [[ -n "${{ inputs.min-score }}" ]]; then
args+=("--min-score" "${{ inputs.min-score }}")
fi
if [[ -n "${{ inputs.config }}" ]]; then
args+=("--config" "${{ inputs.config }}")
fi
printf 'action: helmdoc %s\n' "${args[*]}"
helmdoc "${args[@]}"