Skip to content

feat: add cli doc for backwards compatibly and warnings #3

feat: add cli doc for backwards compatibly and warnings

feat: add cli doc for backwards compatibly and warnings #3

Workflow file for this run

# SPDX-FileCopyrightText: Copyright (c) 2025 NVIDIA CORPORATION & AFFILIATES. All rights reserved.
# SPDX-License-Identifier: Apache-2.0
#
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
# Build and release CLI binaries when cli/* tags are pushed
name: CLI Release
on:
push:
tags:
- cli/*
env:
GO_VERSION: 1.25.5
jobs:
release:
runs-on: ubuntu-latest
permissions:
contents: write # Required to create releases
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Setup Go ${{ env.GO_VERSION }}
uses: actions/setup-go@v5
with:
go-version: ${{ env.GO_VERSION }}
cache-dependency-path: operator/go.sum
- name: Extract version from tag
id: version
run: |
# Tag is cli/v0.1.0, extract v0.1.0
VERSION="${GITHUB_REF_NAME#cli/}"
echo "version=${VERSION}" >> $GITHUB_OUTPUT
echo "Building CLI version: ${VERSION}"
- name: Build CLI binaries
working-directory: operator
run: make cli-release-build CLI_VERSION=${{ steps.version.outputs.version }}
- name: Create GitHub Release
uses: softprops/action-gh-release@v2
with:
tag_name: ${{ github.ref_name }}
name: "Skyhook CLI ${{ steps.version.outputs.version }}"
files: |
operator/dist/*.tar.gz
operator/dist/*.zip
operator/dist/checksums.txt
body: |
## Skyhook CLI ${{ steps.version.outputs.version }}
### Installation
Download and extract the appropriate archive for your platform.
The binary must be named `kubectl-skyhook` for kubectl to discover it as a plugin.
Alternatively, it can be used directly as `skyhook` without kubectl.
```bash
# Linux (amd64)
curl -LO https://github.com/NVIDIA/skyhook/releases/download/${{ github.ref_name }}/skyhook_${{ steps.version.outputs.version }}_linux_amd64.tar.gz
tar -xzf skyhook_${{ steps.version.outputs.version }}_linux_amd64.tar.gz
sudo mv skyhook /usr/local/bin/kubectl-skyhook
# macOS (Apple Silicon)
curl -LO https://github.com/NVIDIA/skyhook/releases/download/${{ github.ref_name }}/skyhook_${{ steps.version.outputs.version }}_darwin_arm64.tar.gz
tar -xzf skyhook_${{ steps.version.outputs.version }}_darwin_arm64.tar.gz
sudo mv skyhook /usr/local/bin/kubectl-skyhook
```
### Verify installation
```bash
kubectl skyhook version --client-only
# Or if installed as 'skyhook':
skyhook version --client-only
```