-
Notifications
You must be signed in to change notification settings - Fork 9
/
action.yml
82 lines (82 loc) · 2.62 KB
/
action.yml
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
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
name: "Conftest Action"
description: "Easily run Conftest, pull remote policies, surface the results, and obtain test metrics"
branding:
icon: "check-square"
color: "purple"
inputs:
files:
description: "Files and/or folders for Conftest to test (space delimited)"
required: true
policy:
description: "Where to find the policy folder or file"
default: "policy"
required: false
data:
description: "Files or folder with supplemental test data"
required: false
all-namespaces:
description: "Whether to use all namespaces in testing"
default: "true"
required: false
combine:
description: "Whether to combine input files"
required: false
pull-url:
description: "URL to pull policies from"
required: false
pull-secret:
description: "Secret that allows the policies to be pulled"
required: false
add-comment:
description: "Whether or not to add a comment to the PR"
default: "true"
required: false
docs-url:
description: "URL where users can find out more about the policies"
required: false
no-fail:
description: "Always returns an exit code of 0 (no error)"
required: false
gh-token:
description: "Token that allows us to post a comment in the PR"
required: false
gh-comment-url:
description: "URL of the comments for the PR"
required: false
metrics-url:
description: "URL to POST the results to for metrics"
required: false
metrics-source:
description: "Unique identifier for the source of the submission"
required: false
metrics-details:
description: "Whether to include the full test results in the metrics"
required: false
metrics-token:
description: "Bearer token for submitting metrics"
required: false
policy-id-key:
description: "Name of the key in the details object that stores the policy ID"
default: "policyID"
required: false
runs:
using: 'docker'
image: 'Dockerfile'
env:
FILES: ${{ inputs.files }}
POLICY: ${{ inputs.policy }}
DATA: ${{ inputs.data }}
ALL_NAMESPACES: ${{ inputs.all-namespaces }}
COMBINE: ${{ inputs.combine }}
PULL_URL: ${{ inputs.pull-url }}
PULL_SECRET: ${{ inputs.pull-secret }}
ADD_COMMENT: ${{ inputs.add-comment }}
DOCS_URL: ${{ inputs.docs-url }}
NO_FAIL: ${{ inputs.no-fail }}
GITHUB_TOKEN: ${{ inputs.gh-token }}
GITHUB_COMMENT_URL: ${{ inputs.gh-comment-url }}
METRICS_URL: ${{ inputs.metrics-url }}
METRICS_SOURCE: ${{ inputs.metrics-source }}
METRICS_DETAILS: ${{ inputs.metrics-details }}
METRICS_TOKEN: ${{ inputs.metrics-token }}
POLICY_ID_KEY: ${{ inputs.policy-id-key }}