Skip to content

Add a GitHub Actions CI workflow example #22

@kmadan

Description

@kmadan

Goal

Add a copy-pasteable GitHub Actions workflow under `examples/github-actions/` that runs a GOPAL policy against an input file and fails the build on non-compliance.

Why this matters

The README pitches GOPAL as "AI compliance checks that run in CI," but doesn't yet ship a working workflow. A concrete `workflow.yaml` makes the integration story real and is the kind of file engineering teams immediately copy into a downstream repo.

Files likely involved

  • `examples/github-actions/workflow.yaml` (new)
  • `examples/github-actions/input.json` (new — or reuse an existing example's input)
  • `examples/github-actions/README.md` (new) — shows how to drop the workflow into a downstream repo

Acceptance criteria

  • Workflow installs OPA (action or curl), checks out gopal, runs `opa eval` against an example input
  • Workflow fails the build when verdict is non-compliant — recommend `--fail-defined` against a deny rule, or a script that checks the JSON output
  • README explains what to copy where in a downstream repo
  • README shows the expected GitHub status-check output for both passing and failing cases
  • `examples/README.md` links to the new example

Get help

Comment here. This is a great first contribution because it touches one workflow file, not Rego.

Metadata

Metadata

Assignees

No one assigned

    Labels

    ciContinuous integration / build infrastructureexamplesRunnable demos and example payloadsgood first issueGood for newcomers

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions