-
Notifications
You must be signed in to change notification settings - Fork 32
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
chore(bors): merge pull request #636
636: CherryPick PR635: Krew fix - only push the latest version r=tiagolobocastro a=tiagolobocastro Push to Krew only if it's the latest version, otherwise skip it. This is because krew doesn't support it. Also speed up the plugin build with a more powerful runner. Co-authored-by: Tiago Castro <[email protected]>
- Loading branch information
Showing
2 changed files
with
15 additions
and
5 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,11 +1,21 @@ | ||
name: Publish Release Artifacts | ||
on: | ||
release: | ||
types: [published] | ||
types: [ published ] | ||
|
||
jobs: | ||
publish-artifacts: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Get Latest Release Tag | ||
id: latest-release | ||
env: | ||
GH_TOKEN: ${{ github.token }} | ||
run: | | ||
LATEST_VERSION=$(gh api repos/${{ github.repository_owner }}/mayastor-extensions/releases/latest | jq -r '.tag_name') | ||
echo "Latest published version:$LATEST_VERSION" | ||
echo "ShouldUpdateKrew:"${{ !github.event.release.prerelease && (steps.latest-release.outputs.latestTag == github.event.release.tag_name) }} | ||
echo "latestTag=$LATEST_VERSION" >> "$GITHUB_OUTPUT" | ||
- uses: actions/checkout@v4 | ||
- name: Download Artifacts | ||
run: | | ||
|
@@ -20,5 +30,5 @@ jobs: | |
env: | ||
GITHUB_TOKEN: ${{ secrets.ORG_CI_GITHUB }} | ||
- name: Update krew index | ||
if: "!github.event.release.prerelease" | ||
if: ${{ !github.event.release.prerelease && (steps.latest-release.outputs.latestTag == github.event.release.tag_name) }} | ||
uses: rajatjindal/[email protected] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters