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
- Detect PlatformIO or Arduino project.
- Install the build toolchain for your board.
- Compile firmware.
- Resolve a version label.
- Upload to firmngin and start OTA when a target is configured.
Workflow examples
Fleet OTA on push to main
Single device (no template)
keys.h setup.
Artifact only (manual deploy later)
Pull request build (no upload)
Build only on PRs — addfirmngin/ota on merge to main if you want upload gated to protected branches.
Matrix build (multiple boards)
Use a GitHub Actions matrix with differentplatformio-env, target-board, and target-model per hardware line.
Version pinning
Pin the action for reproducible pipelines:@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_TOKENas 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 bothtarget-boardandtarget-model. - For single-device mode, store
FIRMNGIN_DEVICE_SECRET_IDin Secrets — an empty value causes this failure.
Arduino sketch not found
- Set
arduino-sketchto the path of your.inofile relative to the repo root. - Subfolder layout:
path_to_your_folder/path_to_your_file.ino(folder name usually matches the.inofilename). - Root layout:
path_to_your_file.inoat the repository root. - Put
keys.hin the same directory as the sketch file.
Build succeeded but upload step failed
- Upgrade to the latest
firmngin/otarelease 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.