A GitHub action that syncs REGO policies from Git to an OPA Server
This example updates policies from a git repository to an Open Policy Agent (OPA) Server.
name: Policy validation using OPA
on: [ push, pull_request ]
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@latest
- name: Sync policy from git to Open Policy Agent (OPA)
uses: OpsVerseIO/[email protected]
with:
opaServerUrl: "https://opa.example.com"
opaServerAuthToken: ${{ secrets.OPA_SERVER_AUTH_TOKEN }}
opaPoliciesPath: "./policies"
recurseDirs: true
skipTlsValidation: true # Skip TLS validation (Optional)
Input | Description |
---|---|
opaServerUrl |
Open Policy Agent (OPA) Server address (with protocol) |
opaServerAuthToken |
Open Policy Agent (OPA) Auth token |
opaPoliciesPath |
Path to REGO Policy directory |
recurseDirs |
Whether to recursively traverse opaPoliciesPath (default = true) |
skipTlsValidation |
Skip TLS validation. Get the data from OPA by ignoring the certificate (default = false) |