[go: up one dir, main page]

Skip to content
package

GitHub Action

kyverno-cli-installer

v0.2.0 Latest version

kyverno-cli-installer

package

kyverno-cli-installer

Installs kyverno CLI and includes it in your path

Installation

Copy and paste the following snippet into your .yml file.

              

- name: kyverno-cli-installer

uses: kyverno/action-install-cli@v0.2.0

Learn more about this action in kyverno/action-install-cli

Choose a version

action-install-cli GitHub Action

This action enables you to install Kyverno CLI.

For a quick start guide on the usage of Kyverno CLI, please refer to https://kyverno.io/docs/kyverno-cli/.

Usage

This action currently supports GitHub-provided Linux, macOS and Windows runners (self-hosted runners may not work).

Add the following entry to your Github workflow YAML file:

uses: kyverno/action-install-cli@v0.2.0
with:
  release: 'v1.9.5' # optional

Example using a pinned version:

jobs:
  example:
    runs-on: ubuntu-latest

    permissions: {}

    name: Install Kyverno CLI
    steps:
      - name: Install Kyverno CLI
        uses: kyverno/action-install-cli@v0.2.0
        with:
          release: 'v1.9.5'
      - name: Check install
        run: kyverno version

Example using the default version:

jobs:
  example:
    runs-on: ubuntu-latest

    permissions: {}

    name: Install Kyverno CLI
    steps:
      - name: Install Kyverno CLI
        uses: kyverno/action-install-cli@v0.2.0
      - name: Check install
        run: kyverno version

Example using cosign verification:

jobs:
  example:
    runs-on: ubuntu-latest

    permissions: {}

    name: Install Kyverno CLI
    steps:
      - name: Install Cosign
        uses: sigstore/cosign-installer@v3.1.1
      - name: Install Kyverno CLI
        uses: kyverno/action-install-cli@v0.2.0
        with:
          verify: true
      - name: Check install
        run: kyverno version

If you want to install Kyverno CLI from its main version by using go install under the hood, you can set release as main. Once you did that, Kyverno CLI will be installed via go install which means that please ensure that go is installed.

Example of installing Kyverno CLI via go install:

jobs:
  example:
    runs-on: ubuntu-latest

    permissions: {}

    name: Install Kyverno CLI via go install
    steps:
      - name: Install go
        uses: actions/setup-go@v4
        with:
          go-version: '1.20'
          check-latest: true
      - name: Install Kyverno CLI
        uses: kyverno/action-install-cli@v0.2.0
        with:
          release: 'main'
      - name: Check install
        run: kyverno version

Optional Inputs

The following optional inputs:

Input Description
release kyverno version to use instead of the default.
install-dir directory to place the kyverno binary into instead of the default ($HOME/.kyverno).
use-sudo set to true if install-dir location requires sudo privs. Defaults to false.
verify set to true to enable cosign verification of the downloaded archive.

Security

Should you discover any security issues, please refer to Kyverno's security process