Skip to main content

GitHub Action

Automatically upload your build artifacts (binaries, hex files, map files, etc.) to EmbedHub projects directly from your GitHub Actions workflows.

Features

  • Upload firmware binaries, hex files, map files, and other build artifacts
  • Support for glob patterns to upload multiple files

Quick Start

1. Create an EmbedHub API Key

  1. Log in to your EmbedHub account
  2. Go to your settings
  3. Navigate to the "API Keys" tab
  4. Create a new API key and copy it

2. Add GitHub Secrets

Add these secrets to your GitHub repository:

  • Go to Settings → Secrets and variables → Actions
  • Click New repository secret

Required secrets:

  • EMBEDHUB_API_KEY - Your EmbedHub API key
  • EMBEDHUB_ORG - Your organization slug (e.g., mycompany or your username)
  • EMBEDHUB_PROJECT - Your project slug (e.g., my-firmware)

3. Use in Your Workflow

Add this action to your GitHub workflow after your build step:

- name: Upload to EmbedHub
uses: Embed-Hub/EmbedHub-GitHub-Action@master
with:
api-key: ${{ secrets.EMBEDHUB_API_KEY }}
organization: ${{ secrets.EMBEDHUB_ORG }}
project: ${{ secrets.EMBEDHUB_PROJECT }}
files: 'build/*.bin'

Usage Examples

Upload Firmware Binary

- name: Upload firmware binary
uses: Embed-Hub/EmbedHub-GitHub-Action@master
with:
api-key: ${{ secrets.EMBEDHUB_API_KEY }}
organization: mycompany
project: iot-device
files: 'firmware.bin'

Upload Multiple Files with Glob Pattern

- name: Upload all build artifacts
uses: Embed-Hub/EmbedHub-GitHub-Action@master
with:
api-key: ${{ secrets.EMBEDHUB_API_KEY }}
organization: mycompany
project: embedded-app
files: 'build/*.{bin,hex,map,elf}'

Upload to Specific Path

- name: Upload release files
uses: Embed-Hub/EmbedHub-GitHub-Action@master
with:
api-key: ${{ secrets.EMBEDHUB_API_KEY }}
organization: mycompany
project: sensor-firmware
files: 'dist/*.bin'
path: 'releases/${{ github.ref_name }}/'

Upload from Subdirectory

- name: Upload from build directory
uses: Embed-Hub/EmbedHub-GitHub-Action@master
with:
api-key: ${{ secrets.EMBEDHUB_API_KEY }}
organization: mycompany
project: motor-controller
files: '*.hex'
working-directory: './build/output'

Inputs

InputRequiredDescriptionDefault
api-keyYesEmbedHub API key (use ${{ secrets.EMBEDHUB_API_KEY }})-
organizationYesOrganization slug (e.g., mycompany or username)-
projectYesProject slug (e.g., my-firmware)-
filesYesFiles to upload (supports glob: *.bin, build/*.{hex,map})-
pathNoTarget path in project (e.g., releases/v1.0.0/)Auto-detected
working-directoryNoWorking directory to run from.

Default File Paths

When path is not specified, files are uploaded to these default locations based on file type:

File TypeExtensionsDefault Path
Release Files.bin, .hex, .elf, .mapreleases/
Documents.pdf, .jpg, .png, .svgdocuments/
Other FilesAll othersRoot directory