Skip to content

add kbcli plugin

add kbcli plugin #4448

Workflow file for this run

name: krew-index CI
on:
push:
branches:
- master
pull_request:
jobs:
build:
name: Validate plugin manifests
runs-on: ubuntu-latest
env:
KREW_VERSION: v0.4.3
GO111MODULE: on
steps:
- name: Setup Go
uses: actions/setup-go@v3
with:
go-version: '1.14'
id: go
- name: Go module cache
uses: actions/cache@v3
with:
path: ~/go/pkg/mod
key: ${{ runner.os }}-go-${{ env.KREW_VERSION }}
restore-keys: |
${{ runner.os }}-go-
- name: Check out PR branch
uses: actions/checkout@v3
with:
fetch-depth: 0 # disable shallow clones
- name: Fetch base branch
if: github.event_name == 'pull_request'
run: |
git fetch --no-tags --prune --depth=1 origin +refs/heads/${GITHUB_BASE_REF}:refs/remotes/origin/${GITHUB_BASE_REF}
- name: Install kubectl
run: |
set -euo pipefail
sudo curl -fsSL -o /usr/bin/kubectl https://dl.k8s.io/release/v1.18.8/bin/linux/amd64/kubectl
sudo chmod +x /usr/bin/kubectl
- name: Install krew
run: |
set -euo pipefail
cd "$(mktemp -d)"
curl -fsSLO "https://github.com/kubernetes-sigs/krew/releases/download/${KREW_VERSION}/krew.yaml"
curl -fsSLO "https://github.com/kubernetes-sigs/krew/releases/download/${KREW_VERSION}/krew-linux_amd64.tar.gz"
tar zxvf krew-linux_amd64.tar.gz
./krew-linux_amd64 install --manifest=krew.yaml --archive=krew-linux_amd64.tar.gz
- name: Install validate-krew-manifest plugin
run : |
set -euo pipefail
export GOBIN=$HOME/bin
go get sigs.k8s.io/krew/cmd/validate-krew-manifest@${KREW_VERSION}
- name: Validate updated plugin manifests
if: github.event_name == 'pull_request'
run : |
set -x
set -euo pipefail
export PATH="${KREW_ROOT:-$HOME/.krew}/bin:$PATH"
git diff --name-only --diff-filter=AM origin/${GITHUB_BASE_REF} ${{ github.sha }} -- plugins/ |
tee /dev/stderr |
xargs -I _ $HOME/bin/validate-krew-manifest -manifest _