Skip to main content
The firmngin/ota GitHub Action builds firmware and publishes it to firmngin. It supports PlatformIO and Arduino CLI, auto-detects your project type, and can start fleet or single-device OTA.
Before you start: Generate an API token in Dashboard → Integrations with the Firmware OTA scope and add it to GitHub Secrets as FIRMNGIN_API_TOKEN. See Step 1: Generate an API token.

Action reference

Inputs

* Use one target mode per run: device-template-id, device-secret-id, or target-board + target-model.

What happens on each run

  1. Detect PlatformIO or Arduino project.
  2. Install the build toolchain for your board.
  3. Compile firmware.
  4. Resolve a version label.
  5. Upload to firmngin and start OTA when a target is configured.

Workflow examples

Fleet OTA on push to main

Single device (no template)

See Arduino CLI CI/CD for keys.h setup.

Artifact only (manual deploy later)

Deploy later from Dashboard → Firmware → Artifacts.

Pull request build (no upload)

Build only on PRs — add firmngin/ota on merge to main if you want upload gated to protected branches.

Matrix build (multiple boards)

Use a GitHub Actions matrix with different platformio-env, target-board, and target-model per hardware line.

Version pinning

Pin the action for reproducible pipelines:
Use the latest stable tag from the firmngin/ota releases. Avoid @main in production.

After a successful run

  • Dashboard → Firmware → Artifacts — new firmware version
  • Dashboard → Firmware → Workflow runs — OTA progress (fleet or single device)

Troubleshooting

Token missing or invalid

  • Store FIRMNGIN_API_TOKEN as a GitHub secret.
  • Regenerate the token in Integrations with Firmware OTA scope if auth fails.

No deploy target configured

  • Set exactly one mode: device-template-id, device-secret-id, or both target-board and target-model.
  • For single-device mode, store FIRMNGIN_DEVICE_SECRET_ID in Secrets — an empty value causes this failure.

Arduino sketch not found

  • Set arduino-sketch to the path of your .ino file relative to the repo root.
  • Subfolder layout: path_to_your_folder/path_to_your_file.ino (folder name usually matches the .ino filename).
  • Root layout: path_to_your_file.ino at the repository root.
  • Put keys.h in the same directory as the sketch file.

Build succeeded but upload step failed

  • Upgrade to the latest firmngin/ota release tag.
  • Confirm secrets and workflow inputs are set.

Library download message in logs

  • Normal during Arduino builds — the action prepares dependencies before compile.

Template or device mismatch

  • Confirm board/model on the device or template matches your build target.
  • For fleet OTA, verify the template has an active Firmware OTA policy.

Device does not update after upload

  • Confirm the device is online.
  • Check Firmware → Workflow runs and device logs in the dashboard.

Firmware file too large

  • Maximum size is 10 MB. Optimize build flags or reduce bundled assets.