Skip to content

Commit

Permalink
chore(bors): merge pull request #636
Browse files Browse the repository at this point in the history
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
mayastor-bors and tiagolobocastro committed Feb 25, 2025
2 parents 9659b34 + 4885a7e commit bbc7925
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 5 deletions.
14 changes: 12 additions & 2 deletions .github/workflows/publish-release-artifacts.yml
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: |
Expand All @@ -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]
6 changes: 3 additions & 3 deletions .github/workflows/release-binaries.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,10 +18,10 @@ jobs:
matrix:
include:
# NOTE: Update the .krew.yaml file (if required) when making changes here.
- os: ubuntu-latest
- os: ubuntu-latest-8-cores
target: linux-musl
arch: x86_64
- os: ubuntu-latest
- os: ubuntu-latest-8-cores
target: linux-musl
arch: aarch64
- os: macos-14
Expand All @@ -30,7 +30,7 @@ jobs:
- os: macos-13
target: apple-darwin
arch: x86_64
- os: ubuntu-latest
- os: ubuntu-latest-8-cores
target: windows-gnu
arch: x86_64
suffix: .exe
Expand Down

0 comments on commit bbc7925

Please sign in to comment.