Skip to content
terminal

GitHub Action

Setup hcloud (Hetzner Cloud CLI)

v2 Latest version

Setup hcloud (Hetzner Cloud CLI)

terminal

Setup hcloud (Hetzner Cloud CLI)

Setup hcloud and add it to the PATH

Installation

Copy and paste the following snippet into your .yml file.

              

- name: Setup hcloud (Hetzner Cloud CLI)

uses: 3bit/setup-hcloud@v2

Learn more about this action in 3bit/setup-hcloud

Choose a version

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