Skip to content

Commit

Permalink
Update README and action.yml
Browse files Browse the repository at this point in the history
  • Loading branch information
aravindnswamy committed Feb 8, 2024
1 parent 3fa8cb6 commit 847d188
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 7 deletions.
17 changes: 10 additions & 7 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,12 +23,13 @@ jobs:
steps:
- uses: actions/checkout@latest
- name: Check policy using Open Policy Agent (OPA)
uses: opsverse/opa-policy-check@0.1.0
uses: opsverse/opa-policy-check@0.2.0
with:
opaServerUrl: "https://opa.example.com"
opaServerAuthToken: ${{ secrets.OPA_SERVER_AUTH_TOKEN }}
opaServerInput: '{"input": null}'
opaServerPackageName: "example/include" # Package name to be given using `/` as the delimiter instead of `.`. For instance package `example.include` should be given as `example/include`
skipTlsValidation: true # Skip TLS validation. Get the data from OPA by ignoring the certificate.
```
NOTE: Following is a simple policy in the OPA server.
Expand All @@ -41,12 +42,13 @@ package example.include
### Inputs
| Input | Description |
|--------------------------|------------------------------------------------------------------------------------|
| `opaServerUrl` | Open Policy Agent (OPA) Server address (with protocol) |
| `opaServerAuthToken` | Open Policy Agent (OPA) Auth token |
| `opaServerInput` | Open Policy Agent (OPA) input |
| `opaServerPackageName` | Open Policy Agent (OPA) package name from which the server should fetch the policy |
| Input | Description |
|--------------------------|-----------------------------------------------------------------------------------------|
| `opaServerUrl` | Open Policy Agent (OPA) Server address (with protocol) |
| `opaServerAuthToken` | Open Policy Agent (OPA) Auth token |
| `opaServerInput` | Open Policy Agent (OPA) input |
| `opaServerPackageName` | Open Policy Agent (OPA) package name from which the server should fetch the policy |
| `skipTlsValidation` | Skip TLS validation. Get the data from OPA by ignoring the certificate (default = false)|
## Examples
Expand All @@ -69,6 +71,7 @@ jobs:
opaServerAuthToken: ${{ secrets.OPA_SERVER_AUTH_TOKEN }}
opaServerInput: '{"input": null}'
opaServerPackageName: "example/include" # Package name to be given using `/` as the delimiter instead of `.`. For instance package `example.include` should be given as `example/include`
skipTlsValidation: true # Skip TLS validation. Get the data from OPA by ignoring the certificate.
```

NOTE: Following is a simple policy in the OPA server.
Expand Down
4 changes: 4 additions & 0 deletions action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,10 @@ inputs:
description: 'OPA Policy Path'
required: true
default: ''
skipTlsValidation:
description: 'Skip TLS validation. Get the data from OPA by ignoring the certificate.'
required: false
default: "false"

runs:
using: node20
Expand Down

0 comments on commit 847d188

Please sign in to comment.