Skip to content

Github action to setup Hetzner Cloud CLI.

License

Notifications You must be signed in to change notification settings

3bit/setup-hcloud

Use this GitHub action with your project
Add this Action to an existing workflow or create a new one
View on Marketplace

Repository files navigation

setup-hcloud

GitHub Actions status

This action sets up the Hetzner Cloud CLI for use in actions.

Usage

There is an optional parameter hcloud-version to setup a specific version of hcloud. The default value for hcloud-version is latest, which will resolve to the version https://github.com/hetznercloud/cli/releases/latest points to.

The environment variable HCLOUD_TOKEN is required for hcloud to work properly. More info can be found here.

Basic usage - setup the latest version:

steps:
- uses: actions/checkout@main
- uses: 3bit/setup-hcloud@v2
- run: hcloud version
  env:
    HCLOUD_TOKEN: ${{ secrets.HCLOUD_TOKEN }}

Setup specific version:

steps:
- uses: actions/checkout@main
- uses: 3bit/setup-hcloud@v2
  with:
    hcloud-version: '1.19.1'
- run: hcloud version
  env:
    HCLOUD_TOKEN: ${{ secrets.HCLOUD_TOKEN }}

License

The scripts and documentation in this project are released under the MIT License