Skip to content

Latest commit

 

History

History
44 lines (35 loc) · 2.25 KB

README.md

File metadata and controls

44 lines (35 loc) · 2.25 KB

Open Policy Agent (OPA) Policy Sync Action

GitHub Super-Linter CI Check dist/ CodeQL Coverage

A GitHub action that syncs REGO policies from Git to an OPA Server

Usage

Example workflow

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)

Inputs

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)