Skip to content

ci: use custom OPA to format Rego #899

ci: use custom OPA to format Rego

ci: use custom OPA to format Rego #899

Workflow file for this run

name: test rego
on:
push:
branches:
- main
paths-ignore:
- "**/*.md"
- "LICENSE"
pull_request:
paths-ignore:
- "**/*.md"
- "LICENSE"
merge_group:
workflow_dispatch:
env:
GO_VERSION: "1.22"
jobs:
opa-tests:
name: OPA tests
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v4
- uses: actions/setup-go@v5
with:
go-version: ${{ env.GO_VERSION }}
- name: OPA Format
run: |
make fmt-rego
if [ -n "$(git status --porcelain)" ]; then
echo "Run 'make fmt-rego' and push it"
exit 1
fi
- name: Test Rego checks
run: make test-rego