Skip to content

lint rules with regal #12

lint rules with regal

lint rules with regal #12

Workflow file for this run

name: Continuous Integration
on:
push:
branches:
- "*"
pull_request:
branches: [ main ]
jobs:
Lint-Rego:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: StyraInc/setup-regal@v1
with:
version: latest
- name: Lint
run: regal lint --format=github ./rules
Rules:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Download mxlint binary
run: |
curl -L https://github.com/mxlint/mxlint-cli/releases/download/v3.0.0/mxlint-v3.0.0-linux-amd64 -o mxlint
chmod +x mxlint
- name: Download modelsource
run: |
curl -L https://github.com/mxlint/mxlint-cli/archive/refs/heads/main.zip -o modelsource.zip
unzip modelsource.zip
mv mxlint-cli-main/modelsource modelsource
rm modelsource.zip
rm -rf mxlint-cli-main
- name: Lint XML output
run: ./mxlint lint --xunit-report report.xml --rules ./rules --modelsource ./modelsource
- name: Lint JSON output
run: ./mxlint lint --json-file report.json --rules ./rules --modelsource ./modelsource
- name: Upload report
uses: actions/upload-artifact@v4
with:
name: report
path: report.*