-
Notifications
You must be signed in to change notification settings - Fork 14
41 lines (34 loc) · 1.15 KB
/
kyverno-cli.yaml
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
name: Test kyverno-cli
on:
push:
paths:
- .github/workflows/kyverno-cli.yaml
- kyverno-cli/**
pull_request:
paths:
- .github/workflows/kyverno-cli.yaml
- kyverno-cli/**
# Declare default permissions as read only.
permissions: read-all
jobs:
kyverno-cli:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@9bb56186c3b09b4f86b1c65136769dd318469633 # v4
- uses: hadolint/hadolint-action@54c9adbab1582c2ef04b2016b760714a4bfde3cf # v3.1.0
with:
dockerfile: kyverno-cli/Dockerfile_build
ignore: DL3041 # https://github.com/hadolint/hadolint/wiki/DL3041
- name: Switch the action to use the Dockerfile_build
run: |
mv kyverno-cli/Dockerfile kyverno-cli/Dockerfile_runnable
mv kyverno-cli/Dockerfile_build kyverno-cli/Dockerfile
- name: kyverno-cli - tests
uses: ./kyverno-cli
with:
tests: kyverno-cli/_test/kyverno.sh
- name: kyverno-cli - raw
uses: ./kyverno-cli
with:
raw: kyverno apply kyverno-cli/_test/policy.yaml --resource kyverno-cli/_test/namespace.yaml