-
Notifications
You must be signed in to change notification settings - Fork 0
42 lines (39 loc) · 1.17 KB
/
conftest.yml
File metadata and controls
42 lines (39 loc) · 1.17 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
name: Check and validate Conftest Rego policies
permissions: {}
'on':
push:
branches:
- main
pull_request:
schedule:
- cron: '12 3 * * 3'
env:
CONFTEST_VERSION: "0.56.0"
jobs:
conftest:
name: Check and validate Conftest Rego policies
runs-on: 'ubuntu-latest'
steps:
- name: Checkout code
uses: actions/checkout@v6
- name: Install conftest
run: |
mkdir -p "${HOME}/.local/bin"
curl -sL "https://github.com/open-policy-agent/conftest/releases/download/v${CONFTEST_VERSION}/conftest_${CONFTEST_VERSION}_Linux_x86_64.tar.gz" | tar xzf - -C "${HOME}/.local/bin" conftest
- name: Setup opa
uses: open-policy-agent/setup-opa@v2
- name: Setup regal
uses: StyraInc/setup-regal@v1
- name: Checking Rego formatting style
run: |
make check-fmt
- name: Lint conftest policies with regal
run: |
make lint
- name: Unit testing conftest policies
run: |
make test
- name: Ensure that all documentation is updated
run: |
make docs
git status --porcelain | awk '{ print } END { exit (NR > 0) }'