Skip to content
code

GitHub Action

Setup balena CLI Action

v0.0.6 Latest version

Setup balena CLI Action

code

Setup balena CLI Action

Setup the balena CLI in a GitHub Actions workflow

Installation

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

              

- name: Setup balena CLI Action

uses: balena-io-examples/setup-balena-action@v0.0.6

Learn more about this action in balena-io-examples/setup-balena-action

Choose a version

Setup balena CLI Action

This action installs the balena CLI in your GitHub Actions workflow for interactions with balenaCloud like pushing releases.

Usage

uses: balena-io-examples/setup-balena-action@main
with:
  # balena CLI version to install (example: `v18.1.9`)
  # Default: 'latest'
  cli-version: ''

  # balenaCloud API token to login automatically
  # Default: ''
  balena-token: ''

  # Skip using the tool cache and always re-download
  # Default: 'false'
  skip-cache: ''

Examples

Install latest release

- name: Setup balena CLI
  uses: balena-io-examples/setup-balena-action@main

Install specific release

- name: Setup balena CLI
  uses: balena-io-examples/setup-balena-action@main
  with:
    cli-version: v18.1.9

Login to balenaCloud

- name: Setup balena CLI
  uses: balena-io-examples/setup-balena-action@main
  with:
    balena-token: "*****"

Login to balenaCloud staging

- name: Setup balena CLI
  uses: balena-io-examples/setup-balena-action@main
  env:
    BALENARC_BALENA_URL: balena-staging.com
  with:
    balena-token: "*****"

Push release to balenaCloud

jobs:
  push:
    runs-on: ubuntu-latest
    steps:
    - uses: actions/checkout@v4
    - name: Setup balena CLI
      uses: balena-io-examples/setup-balena-action@main
      with:
        balena-token: "*****"
    - name: Push release
      run: balena push myorg/myfleet