fixes lint errors #18
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: CI | |
on: | |
pull_request_target: | |
workflow_dispatch: | |
jobs: | |
build: | |
name: Continuous Test | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
if: github.event_name == 'pull_request_target' | |
with: | |
ref: "refs/pull/${{ github.event.number }}/merge" | |
- uses: actions/checkout@v4 | |
if: github.event_name != 'pull_request_target' | |
- name: Setup OPA | |
uses: open-policy-agent/setup-opa@v2 | |
with: | |
version: latest | |
- name: Set up Regal | |
uses: StyraInc/setup-regal@v1 | |
with: | |
version: latest | |
- name: format | |
run: | | |
opa fmt policies --fail --diff | |
opa fmt samples --fail --diff | |
- name: check | |
run: opa check policies samples | |
- name: lint | |
run: regal lint --format=github policies samples | |
- name: test | |
run: opa test -v policies samples |