diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 50734bf..b76da96 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -38,6 +38,6 @@ jobs: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} HOMEBREW_TAP_GITHUB_TOKEN: ${{ secrets.HOMEBREW_TAP_GITHUB_TOKEN }} - name: Update krew-index - uses: rajatjindal/krew-release-bot@v0.0.43 + uses: rajatjindal/krew-release-bot@v0.0.46 with: krew_template_file: .krew/tail.yaml diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index d3ed7b5..f6de359 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -21,3 +21,20 @@ jobs: go-version-file: go.mod cache: true - run: go test -v ./... + - name: Validate krew-index manifest + run: | + set -euo pipefail + KREW_VERSION=v0.4.4 + pushd "$(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 + popd + export PATH="${KREW_ROOT:-$HOME/.krew}/bin:$PATH" + export TAG=$(curl -sL https://github.com/boz/kail/releases/latest -H "Accept: application/json" | jq -r .tag_name) + ls -la ./.krew/tail.yaml + 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 install sigs.k8s.io/krew/cmd/validate-krew-manifest@latest + ~/go/bin/validate-krew-manifest -manifest /tmp/tail.yaml + diff --git a/.krew/tail.yaml b/.krew/tail.yaml index 5884692..7e18430 100644 --- a/.krew/tail.yaml +++ b/.krew/tail.yaml @@ -54,7 +54,7 @@ spec: matchLabels: os: windows arch: arm64 - bin: kail + bin: kail.exe files: - from: "kail.exe" to: "." @@ -65,7 +65,7 @@ spec: matchLabels: os: windows arch: amd64 - bin: kail + bin: kail.exe files: - from: "kail.exe" to: "."