Skip to content

Commit

Permalink
move Validate krew-index to ci.yml
Browse files Browse the repository at this point in the history
  • Loading branch information
Slach committed Dec 27, 2023
1 parent bf06a79 commit 2d745cb
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 17 deletions.
16 changes: 16 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,22 @@ jobs:
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
HOMEBREW_TAP_GITHUB_TOKEN: ${{ secrets.HOMEBREW_TAP_GITHUB_TOKEN }}
- 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
- name: Update krew-index
uses: rajatjindal/[email protected]
with:
Expand Down
18 changes: 1 addition & 17 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,20 +21,4 @@ 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

0 comments on commit 2d745cb

Please sign in to comment.