mirror of
https://github.com/yannh/kubeconform.git
synced 2026-02-11 14:09:21 +00:00
Add documentation on how to use kubeconform as a Github Action
This commit is contained in:
parent
e4d5505c10
commit
fa1cb37020
1 changed files with 28 additions and 0 deletions
28
Readme.md
28
Readme.md
|
|
@ -193,6 +193,34 @@ $ ./scripts/openapi2jsonschema.py https://raw.githubusercontent.com/aws/amazon-s
|
|||
JSON schema written to trainingjob-sagemaker-v1.json
|
||||
```
|
||||
|
||||
### Usage as a Github Action
|
||||
|
||||
Kubeconform is publishes Docker Images to Github's new Container Registry, ghcr.io. These images
|
||||
can be used directly in a Github Action, once logged in using a [_Github Token_](https://github.blog/changelog/2021-03-24-packages-container-registry-now-supports-github_token/).
|
||||
|
||||
Example:
|
||||
```
|
||||
name: kubeconform
|
||||
on: push
|
||||
jobs:
|
||||
kubeconform:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: login to Github Packages
|
||||
run: echo "${{ github.token }}" | docker login https://ghcr.io -u ${GITHUB_ACTOR} --password-stdin
|
||||
- uses: actions/checkout@v2
|
||||
- uses: docker://ghcr.io/yannh/kubeconform:master
|
||||
with:
|
||||
entrypoint: '/kubeconform'
|
||||
args: "-summary -output json kubeconfigs/"
|
||||
```
|
||||
|
||||
_Note on pricing_: Kubeconform relies on Github Container Registry which is currently in Beta. During that period,
|
||||
[bandwidth is free](https://docs.github.com/en/packages/guides/about-github-container-registry). After that period,
|
||||
bandwidth costs might be applicable. Since bandwidth from Github Packages within Github Actions is free, I expect
|
||||
Github Container Registry to also be usable for free within Github Actions in the future. If that were not to be the
|
||||
case, I might publish the Docker image to a different platform.
|
||||
|
||||
### Speed comparison with Kubeval
|
||||
|
||||
Running on a pretty large kubeconfigs setup, on a laptop with 4 cores:
|
||||
|
|
|
|||
Loading…
Reference in a new issue