Merge pull request #120 from garethahealy/main #85
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: Test kyverno-cli | |
on: | |
push: | |
paths: | |
- .github/workflows/kyverno-cli.yaml | |
- kyverno-cli/** | |
pull_request: | |
paths: | |
- .github/workflows/kyverno-cli.yaml | |
- kyverno-cli/** | |
jobs: | |
kyverno-cli: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout | |
uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # 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 |