Skip to content
You're viewing an older version of this GitHub Action. Do you want to see the latest version instead?
upload-cloud

GitHub Action

Balena CLI (Nebra fork)

v19.3.0

Balena CLI (Nebra fork)

upload-cloud

Balena CLI (Nebra fork)

Continuously deliver your IoT applications to BalenaCloud or openBalena

Installation

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

              

- name: Balena CLI (Nebra fork)

uses: NebraLtd/[email protected]

Learn more about this action in NebraLtd/balena-cli-action

Choose a version

Balena CLI

Continuously deliver your applications to balenaCloud using the official balena CLI tool.

Based on Balena Push from Joe Mainwaring and balena CLI action from Brint Kriebel.

Inputs

balena_api_token

Required: A BalenaCloud API Token, used to authenticate with BalenaCloud. API keys can be created in the user settings for BalenaCloud.

balena_command

Required: The balena command you would like to run with the action.

application_path

Optional: Provide a sub-path to the location for application being deployed to BalenaCloud. Defaults to the workspace root.

balena_secrets

Optional: Provide the contents of a balena secrets.json file for authenticating against private registries.

Note: If using private GitHub Packages, you must provide a Personal Access Token instead of using the builtin secrets.GITHUB_TOKEN. GitHub currently does not support pulling from private package registries using the actions token.

balena_url

Optional: Redirects deployment to an openBalena instance instead of Balena Cloud. Should be a URL in the format cloud.openbalena.com.

Workflow Example

name: BalenaCloud Deploy

on:
  push:
    # Only run workflow for pushes to specific branches
    branches:
      - master

jobs:
  balena-deploy:
    runs-on: ubuntu-latest
    steps:
      - name: Checkout
        uses: actions/checkout@v3
      - name: Balena Deploy
        uses: NebraLtd/[email protected]
        if: success()
        with:
          balena_url: cloud.openbalena.com
          balena_api_token: ${{secrets.BALENA_API_TOKEN}}
          balena_command: "deploy my-awesome-app --logs"
          balena_secrets: |
            {
              "docker.pkg.github.com": {
                "username": "${{ secrets.MY_GITHUB_USER }}",
                "password": "${{ secrets.MY_GITHUB_TOKEN }}"
              }
            }