Skip to content

Commit

Permalink
Add GitHub Action to docs/README.md (#102)
Browse files Browse the repository at this point in the history
* Update docs/README.md for GH action

* Fix header level

* Update README.md

Fix action version.

* Update docs/README.md

Co-authored-by: Gaurav Nelson <gaurav@stackrox.com>

Co-authored-by: Gaurav Nelson <gaurav@stackrox.com>
  • Loading branch information
neilcar and Gaurav Nelson committed Dec 4, 2020
1 parent a1a6aec commit 475075c
Showing 1 changed file with 17 additions and 0 deletions.
17 changes: 17 additions & 0 deletions docs/README.md
100644 → 100755
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,23 @@ brew install kube-linter
docker run -v /path/to/files/you/want/to/lint:/dir -v /path/to/config.yaml:/etc/config.yaml stackrox/kube-linter lint /dir --config /etc/config.yaml
```

### KubeLinter Github Action

You can also run KubeLinter as a GitHub Action. To use the KubeLinter Github Action, create a `kubelint.yml` file (or choose custom `*.yml` file name) in the `.github/workflows/` directory and use `stackrox/kube-linter-action@v1`.
```yaml
- name: Scan yamls
id: kube-lint-scan
uses: stackrox/kube-linter-action@v1
with:
directory: yamls
config: .kube-linter/config.yaml
```
The KubeLinter Github Action accepts the following inputs:

|Parameter|Description|
|:--|:--|
|`directory`|(Mandatory) A directory path that contains the Kubernetes YAML files or `Chart.yaml` file.|
|`config`|(Optional) A path to your custom [KubeLinter configuration file](configuring-kubelinter.md).
## Building from source

> [!NOTE] Before you build, make sure that you have [installed Go](https://golang.org/doc/install).
Expand Down

0 comments on commit 475075c

Please sign in to comment.