From 2d745cbfbcab5921930520f0c28f130763fc2d86 Mon Sep 17 00:00:00 2001 From: Slach Date: Wed, 27 Dec 2023 13:54:51 +0500 Subject: [PATCH] move Validate krew-index to ci.yml --- .github/workflows/ci.yml | 16 ++++++++++++++++ .github/workflows/test.yml | 18 +----------------- 2 files changed, 17 insertions(+), 17 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index b76da96..3b7819e 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -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/krew-release-bot@v0.0.46 with: diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index f6de359..ee7468e 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -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 - +