From 02599f1835bd015262ca705e43f30f6e912933ba Mon Sep 17 00:00:00 2001 From: Chi-Sheng Liu Date: Wed, 12 Feb 2025 03:06:47 +0800 Subject: [PATCH] [Fix][CI] kubectl plugin krew index CI error Signed-off-by: Chi-Sheng Liu --- .github/workflows/kubectl-plugin-release.yaml | 19 +++++++++---------- 1 file changed, 9 insertions(+), 10 deletions(-) diff --git a/.github/workflows/kubectl-plugin-release.yaml b/.github/workflows/kubectl-plugin-release.yaml index 6265a0ed92a..6331adf964f 100644 --- a/.github/workflows/kubectl-plugin-release.yaml +++ b/.github/workflows/kubectl-plugin-release.yaml @@ -1,10 +1,7 @@ name: release-kubectl-plugin on: workflow_dispatch: - inputs: - tag: - description: 'Desired release version tag (e.g. v1.1.0-rc.1).' - required: true + jobs: release-kubectl-plugin: runs-on: ubuntu-latest @@ -12,10 +9,12 @@ jobs: - name: Checkout uses: actions/checkout@v4 with: - ref: ${{ github.event.inputs.tag }} - fetch-tags: 'true' - - name: Show tag - run: git show-ref --head --dereference | grep "$(git rev-parse HEAD)" + fetch-depth: 0 + - name: Error if not a tag + if: ${{ ! startsWith(github.ref, 'refs/tags/') }} + run: | + echo "::error not a tag" + exit 1 - name: Setup Go uses: actions/setup-go@v5 with: @@ -29,5 +28,5 @@ jobs: workdir: 'kubectl-plugin' env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - - name: Update new version in krew-index - uses: rajatjindal/krew-release-bot@v0.0.46 +# - name: Update new version in krew-index +# uses: rajatjindal/krew-release-bot@v0.0.46