Skip to content

Commit

Permalink
Merge pull request karmada-io#5224 from liangyuanpeng/update_krew_stable
Browse files Browse the repository at this point in the history
Only update krew index for latest stable version.
  • Loading branch information
karmada-bot committed Aug 31, 2024
2 parents 2d92fed + 31177dd commit 96f5149
Showing 1 changed file with 12 additions and 1 deletion.
13 changes: 12 additions & 1 deletion .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -200,11 +200,22 @@ jobs:
base64-subjects: "${{ needs.sbom-assests.outputs.hashes }}"
provenance-name: "karmada-sbom.intoto.jsonl"
upload-assets: true

update-krew-index:
needs: release-assests
needs:
- release-assests
name: Update krew-index
runs-on: ubuntu-22.04
steps:
- name: get latest tag
id: get-latest-tag
run: |
export LATEST_TAG=`gh api repos/karmada-io/karmada/releases/latest | jq -r '.tag_name'`
echo "Got the latest tag:$LATEST_TAG"
echo "event.tag:"${{ github.event.release.tag_name }}
echo "latestTag=$LATEST_TAG" >> "$GITHUB_OUTPUT"
- uses: actions/checkout@v4
if: steps.get-latest-tag.outputs.latestTag == github.event.release.tag_name
- name: Update new version in krew-index
if: steps.get-latest-tag.outputs.latestTag == github.event.release.tag_name
uses: rajatjindal/[email protected]

0 comments on commit 96f5149

Please sign in to comment.