# Copyright 2025 New Vector Ltd.
#
# SPDX-License-Identifier: AGPL-3.0-only OR LicenseRef-Element-Commercial
# Please see LICENSE files in the repository root for full details.

name: Build the Open Policy Agent policies
description: Installs OPA and builds the policies

runs:
  using: composite
  steps:
    - name: Install Open Policy Agent
      uses: open-policy-agent/setup-opa@v2.2.0
      with:
        # Keep in sync with the Dockerfile and policies/Makefile
        version: 1.8.0

    - name: Build the policies
      run: make
      working-directory: ./policies
      shell: sh
