Skip to content

Commit

Permalink
ci: add krew-release-bot for automated krew index updates
Browse files Browse the repository at this point in the history
Signed-off-by: Niladri Halder <niladri.halder26@gmail.com>
  • Loading branch information
niladrih committed Sep 18, 2024
1 parent e21d87f commit 1592c3b
Show file tree
Hide file tree
Showing 3 changed files with 45 additions and 0 deletions.
2 changes: 2 additions & 0 deletions .github/workflows/publish-release-artifacts.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,3 +19,5 @@ jobs:
./scripts/github/release-artifacts.sh --tag "${{ github.event.release.tag_name }}" --repo-org "${{ github.repository_owner }}" --upload "$repos" upload
env:
GITHUB_TOKEN: ${{ secrets.ORG_CI_GITHUB }}
- name: Update krew index
uses: rajatjindal/krew-release-bot@v0.0.46
2 changes: 2 additions & 0 deletions .github/workflows/release-binaries.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ jobs:
fail-fast: false
matrix:
include:
# NOTE: Update the .krew.yaml file (if required) when making changes here.
- os: ubuntu-latest
target: linux-musl
arch: x86_64
Expand Down Expand Up @@ -63,6 +64,7 @@ jobs:
nix-build -A utils.release.${{ matrix.arch }}.${{ matrix.target }}.kubectl-plugin --arg incremental false ${{ matrix.system }}
- name: Archive executable
run: |
# NOTE: Update the .krew.yaml file (if required) when making changes here.
tar -czvf kubectl-mayastor-${{ matrix.arch }}-${{ matrix.target }}.tar.gz LICENSE -C result/bin kubectl-mayastor${{ matrix.suffix }}
- uses: actions/upload-artifact@v4
with:
Expand Down
41 changes: 41 additions & 0 deletions .krew.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
apiVersion: krew.googlecontainertools.github.com/v1alpha2
kind: Plugin
metadata:
name: mayastor
spec:
version: {{ .TagName }}
homepage: https://openebs.io/docs/
shortDescription: Provides commands for OpenEBS Mayastor.
description: |
This plugin allows you to manage Mayastor volumes and upgrades.
platforms:
- selector:
matchLabels:
os: darwin
arch: amd64
{{addURIAndSha "https://github.com/openebs/mayastor-extensions/releases/download/{{ .TagName }}/kubectl-mayastor-x86_64-apple-darwin.tar.gz" .TagName }}
bin: kubectl-mayastor
- selector:
matchLabels:
os: darwin
arch: arm64
{{addURIAndSha "https://github.com/openebs/mayastor-extensions/releases/download/{{ .TagName }}/kubectl-mayastor-aarch64-apple-darwin.tar.gz" .TagName }}
bin: kubectl-mayastor
- selector:
matchLabels:
os: linux
arch: amd64
{{addURIAndSha "https://github.com/openebs/mayastor-extensions/releases/download/{{ .TagName }}/kubectl-mayastor-x86_64-linux-musl.tar.gz" .TagName }}
bin: kubectl-mayastor
- selector:
matchLabels:
os: linux
arch: arm64
{{addURIAndSha "https://github.com/openebs/mayastor-extensions/releases/download/{{ .TagName }}/kubectl-mayastor-aarch64-linux-musl.tar.gz" .TagName }}
bin: kubectl-mayastor
- selector:
matchLabels:
os: windows
arch: amd64
{{addURIAndSha "https://github.com/openebs/mayastor-extensions/releases/download/{{ .TagName }}/kubectl-mayastor-x86_64-windows-gnu.tar.gz" .TagName }}
bin: kubectl-mayastor.exe

0 comments on commit 1592c3b

Please sign in to comment.