Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fixes for krew index #152

Merged
merged 8 commits into from
Dec 27, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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/[email protected].43
uses: rajatjindal/[email protected].46
with:
krew_template_file: .krew/tail.yaml
17 changes: 17 additions & 0 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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

4 changes: 2 additions & 2 deletions .krew/tail.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ spec:
matchLabels:
os: windows
arch: arm64
bin: kail
bin: kail.exe
files:
- from: "kail.exe"
to: "."
Expand All @@ -65,7 +65,7 @@ spec:
matchLabels:
os: windows
arch: amd64
bin: kail
bin: kail.exe
files:
- from: "kail.exe"
to: "."
Expand Down