fixes for krew index #135
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 | |
on: | |
push: | |
tags: | |
- "**" | |
branches: | |
- master | |
pull_request: | |
permissions: | |
contents: read | |
jobs: | |
test: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v3 | |
- uses: actions/setup-go@v3 | |
with: | |
go-version-file: go.mod | |
cache: true | |
- run: go test -v ./... | |
- name: Validate krew-index manifest | |
run: | | |
pwd | |
ls -la ./ | |
set -euo pipefail | |
KREW_VERSION=v0.4.4 | |
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 | |
TAG=$(curl -sL https://github.com/boz/kail/releases/latest -H "Accept: application/json" | jq -r .tag_name) | |
go install sigs.k8s.io/krew/cmd/validate-krew-manifest@latest | |
docker run --rm -v ./.krew/tail.yaml:/tmp/template-file.yaml ghcr.io/rajatjindal/krew-release-bot:latest krew-release-bot template --tag ${TAG} --template-file /tmp/template-file.yaml 1>/tmp/tail.yaml | |
~/go/bin/validate-krew-manifest -manifest /tmp/tail.yaml | |