An open API service indexing awesome lists of open source software.

https://github.com/vbem/setup-hcloud

๐ŸŒผ Setup Huawei Cloud KooCLI - `hcloud` CLI
https://github.com/vbem/setup-hcloud

cli hcloud huawei huaweicloud hw koocli

Last synced: 10 days ago
JSON representation

๐ŸŒผ Setup Huawei Cloud KooCLI - `hcloud` CLI

Awesome Lists containing this project

README

          

# ๐ŸŒผ GitHub Action to Setup Huawei Cloud KooCLI - `hcloud` CLI

[![๐Ÿงช Testing](https://github.com/vbem/setup-hcloud/actions/workflows/test.yml/badge.svg)](https://github.com/vbem/setup-hcloud/actions/workflows/test.yml)
[![GitHub release (latest SemVer)](https://img.shields.io/github/v/release/vbem/setup-hcloud?label=Release&logo=github)](https://github.com/vbem/setup-hcloud/releases)
[![Marketplace](https://img.shields.io/badge/GitHub%20Actions-Marketplace-blue?logo=github)](https://github.com/marketplace/actions/setup-hcloud)

## About

[***KooCLI***](https://support.huaweicloud.com/hcli/index.html) is the official command-line tool for Huawei Cloud. Huawei Cloud previously provided a [simple installation action](https://github.com/huaweicloud/huaweicloud-cli-action), but that repository currently returns 404. This action provides an alternative way to install KooCLI in your workflows. It supports Linux, macOS, and Windows runners, and can download KooCLI binaries from an internal mirror when needed.

## Example usage

```yaml
- name: Setup HW Cloud KooCLI
uses: vbem/setup-hcloud@main

- name: Test KooCLI with Huawei Cloud STS
env:
HUAWEICLOUD_SDK_REGION: cn-north-4
HUAWEICLOUD_SDK_AK: ${{ secrets.HUAWEICLOUD_SDK_AK }}
HUAWEICLOUD_SDK_SK: ${{ secrets.HUAWEICLOUD_SDK_SK }}
run: |
hcloud sts GetCallerIdentity \
--cli-region="${HUAWEICLOUD_SDK_REGION}" \
--cli-access-key="${HUAWEICLOUD_SDK_AK}" \
--cli-secret-key="${HUAWEICLOUD_SDK_SK}" \
| jq -C
```

## Inputs

ID | Type | Default | Description
--- | --- | --- | ---
`agree-privacy` | Boolean | `true` | Whether to accept the [privacy statement](https://support.huaweicloud.com/productdesc-hcli/hcli_024.html) during KooCLI installation.
`check-version` | Boolean | `true` | Whether to check the [KooCLI version](https://support.huaweicloud.com/usermanual-hcli/hcli_04_004.html) after installation. Requires `agree-privacy` to be `true`.
`base-url` | String | `https://cn-north-4-hdn-koocli.obs.cn-north-4.myhuaweicloud.com/cli/latest/` | Base URL for downloading the [official KooCLI binaries](https://support.huaweicloud.com/qs-hcli/hcli_02_003_02.html). Set this to an internal mirror if needed.

## Outputs

ID | Type | Description | Example
--- | --- | --- | ---
`url` | String | The URL used to download the KooCLI binary. | `https://cn-north-4-hdn-koocli.obs.cn-north-4.myhuaweicloud.com/cli/latest/huaweicloud-cli-linux-amd64.tar.gz`
`path` | String | The path to the KooCLI binary on the runner. | `/usr/local/bin/hcloud`
`version` | String | The detected KooCLI version. | `Current KooCLI version: 7.2.2`