Skip to content

Update dependency open-policy-agent/opa to v1.5.1 #828

Update dependency open-policy-agent/opa to v1.5.1

Update dependency open-policy-agent/opa to v1.5.1 #828

Workflow file for this run

name: Lint policies with OPA/Regal
on: [push, pull_request]
# Declare default permissions as read only.
permissions: read-all
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
jobs:
lint-policy:
runs-on: ubuntu-latest
env:
# renovate: datasource=github-releases depName=open-policy-agent/opa
OPA_VERSION: v1.5.1
# renovate: datasource=github-releases depName=StyraInc/regal
REGAL_VERSION: v0.33.1
# renovate: datasource=pypi depName=yq
YQ_VERSION: 3.4.3
steps:
- name: Harden Runner
uses: step-security/harden-runner@0634a2670c59f64b4a01f0f96f84700a4088b9f0 # v2.12.0
with:
egress-policy: audit
- name: Checkout
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
- name: Setup Python
uses: actions/setup-python@a26af69be951a213d495a4c3e4e4022e16d87065 # v5
- name: Setup yq (pypi.org/project/yq/)
run: |
pip3 install yq==${YQ_VERSION}
- name: Setup OPA
uses: open-policy-agent/setup-opa@34a30e8a924d1b03ce2cf7abe97250bbb1f332b5 # v2.2.0
with:
version: ${{ env.OPA_VERSION }}
- name: Setup Regal
uses: StyraInc/setup-regal@33a142b1189004e0f14bf42b15972c67eecce776 # v1.0.0
with:
version: ${{ env.REGAL_VERSION }}
- name: Setup Bats
uses: bats-core/bats-action@42fcc8700f773c075a16a90eb11674c0318ad507 # 3.0.1
- name: Setup Conftest
uses: princespaghetti/setup-conftest@d75fd184422abf484802a0fefc0453f2cda20f95 # v1.1.23
- name: Setup oc
uses: redhat-actions/openshift-tools-installer@144527c7d98999f2652264c048c7a9bd103f8a82 # v1
with:
oc: "4"
- name: Run OPA Check
run: opa check policy --strict --v0-compatible
- name: Run Regal lint
run: regal lint --format github policy
- name: Run OPA eval --profile
run: _test/opa-profile.sh
- name: Upload opa-profile.log
uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # v4
with:
name: profile-results
path: opa-profile.log