Skip to content

Commit 92408b6

Browse files
author
James Alseth
authored
Update Action metadata in preparation of publishing to the Marketplace (#4)
1 parent 785b437 commit 92408b6

File tree

2 files changed

+24
-8
lines changed

2 files changed

+24
-8
lines changed

action.yml

Lines changed: 22 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,48 +1,64 @@
1-
name: "Conftest"
2-
description: "Write tests against structured configuration data using Open Policy Agent"
1+
name: "Conftest Action"
2+
description: "Easily run Conftest, surface the results, and obtain test metrics"
33
branding:
4-
icon: "check"
5-
color: "green"
4+
icon: "check-square"
5+
color: "purple"
66
inputs:
77
files:
88
description: "Files and/or folders for Conftest to test (space delimited)"
99
required: true
1010
policy:
1111
description: "Where to find the policy folder or file"
1212
default: "policy"
13+
required: false
1314
data:
1415
description: "Files or folder with supplemental test data"
16+
required: false
1517
all-namespaces:
1618
description: "Whether to use all namespaces in testing"
17-
default: true
19+
default: "true"
20+
required: false
1821
combine:
1922
description: "Whether to combine input files"
23+
required: false
2024
pull-url:
2125
description: "URL to pull policies from"
26+
required: false
2227
pull-secret:
2328
description: "Secret that allows the policies to be pulled"
29+
required: false
2430
add-comment:
2531
description: "Whether or not to add a comment to the PR"
26-
default: true
32+
default: "true"
33+
required: false
2734
docs-url:
2835
description: "URL where users can find out more about the policies"
36+
required: false
2937
no-fail:
3038
description: "Always returns an exit code of 0 (no error)"
39+
required: false
3140
gh-token:
3241
description: "Token that allows us to post a comment in the PR"
42+
required: false
3343
gh-comment-url:
3444
description: "URL of the comments for the PR"
45+
required: false
3546
metrics-url:
3647
description: "URL to POST the results to for metrics"
48+
required: false
3749
metrics-source:
3850
description: "Unique identifier for the source of the submission"
51+
required: false
3952
metrics-details:
4053
description: "Whether to include the full test results in the metrics"
54+
required: false
4155
metrics-token:
4256
description: "Bearer token for submitting metrics"
57+
required: false
4358
policy-id-key:
4459
description: "Name of the key in the details object that stores the policy ID"
4560
default: "policyID"
61+
required: false
4662
runs:
4763
using: 'docker'
4864
image: 'Dockerfile'

main.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -56,8 +56,8 @@ type metricsSubmission struct {
5656
}
5757

5858
type metricsSeverity struct {
59-
Count int `json:"count"`
60-
PolicyIDs []string `json:"policyIDs"`
59+
Count int `json:"count,omitempty"`
60+
PolicyIDs []string `json:"policyIDs,omitempty"`
6161
}
6262

6363
const commentTemplate = `**Conftest has identified issues with your resources**

0 commit comments

Comments
 (0)