Skip to content

Commit

Permalink
Make the action more flexible
Browse files Browse the repository at this point in the history
  • Loading branch information
garethr committed Oct 30, 2019
1 parent 55cf067 commit 13c00b4
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 3 deletions.
4 changes: 3 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,9 @@ passed to the action using `with`, as demonstrated with `files` in the above exa

| Property | Default | Description |
| --- | --- | --- |
| files | - | *Required* which files to test |
| files | - | *Required* which files to test |
| policy | policy | Where to find the policy folder or files |
| namespace | main | The Rego namespace to use for testing |
| output | stdout | How to format the output from Conftest (stdout, json or tap) |
| args | - | Any additional arguments to pass to Conftest |

11 changes: 9 additions & 2 deletions action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,17 +11,24 @@ inputs:
policy:
description: "Where to find the policy folder or file"
default: "policy"
namespace:
description: "The Rego namespace to use for testing"
default: "main"
output:
description: "Output format for results"
default: "stdout"
args:
description: "Any additional arguments to pass to Conftest"
runs:
using: 'docker'
image: 'docker://instrumenta/conftest:latest'
args:
- test
- ${{ inputs.files }}
- -o
- ${{ inputs.output }}
- -p
- ${{ inputs.policy }}

- --namespace
- ${{ inputs.namespace }}
- ${{ inputs.args }}
- ${{ inputs.files }}

0 comments on commit 13c00b4

Please sign in to comment.