Setup overview
Complete these steps in order before your first CI/CD run:Step 1: Generate an API token
Every CI/CD pipeline needs a workspace API token with the Firmware OTA scope. Generate it from the dashboard first — do not skip this step.Open Integrations
- Log in to firmngin.dev.
- Select the workspace that owns your devices or device templates.
- In the sidebar, open Integrations (below Billing).
Create the token
- Click Generate Token (top right, or from the empty state).
- On the Generate API Token page, fill in:
- Token name — a label you will recognize later (for example
github-ota-productionorstaging-firmware). - Scopes — check Firmware OTA. At least one scope is required.
- Token name — a label you will recognize later (for example
- Click Generate Token.
Copy the token immediately
After generation, firmngin shows the full token once. A warning banner reminds you that it will not be shown again.- Click Copy next to the token value.
- Paste it into a password manager or directly into GitHub Secrets (see Step 2).
- Click OK to return to the Integrations list.
Token format
Copy the entire token exactly as shown on the Generate Token screen.Manage tokens later
From Integrations, you can:Step 2: Add the token to GitHub
After copying the token from Step 1, store it as a GitHub secret (never as a variable or in workflow YAML).- Open your firmware repository on GitHub.
- Go to Settings → Secrets and variables → Actions.
- Click New repository secret.
- Set:
- Name:
FIRMNGIN_API_TOKEN - Secret: paste the full token from Step 1
- Name:
- Click Add secret.
${{ secrets.FIRMNGIN_API_TOKEN }}.
Step 3: Add GitHub Secrets and variables
Go to Settings → Secrets and variables → Actions.Secrets (required)
Example workflow step for Arduino projects:
keys.h in the same folder as your .ino file.
Variables (optional)
Non-secret identifiers can live in Variables:
You can also store
FIRMNGIN_DEVICE_SECRET_ID as a secret (recommended) instead of a variable.
See Where to find IDs below.
What CI/CD covers
Deployment modes
Choose one target mode per workflow run:Prerequisites
Before adding CI/CD to a repository:- A firmngin workspace with at least one registered device or device template.
- Firmware source that builds with PlatformIO (
platformio.ini) or Arduino CLI (sketch folder with matching.inofilename). - Board and model on your device or template must match the compiled firmware target.
- For fleet rollouts, a Firmware OTA policy attached to the target device template (see OTA policy).
- For single-device deploy, the device must have board name and board model set in the dashboard.
High-level architecture
Configure GitHub repository
This section expands Step 2 and Step 3 above. In your firmware repository, go to Settings → Secrets and variables → Actions.Secrets
Variables
Where to find IDs
Device template ID- Open Dashboard → Device templates.
- Open the template you use for fleet devices.
- Copy the template UUID from the URL or template detail panel.
- Open Dashboard → Devices.
- Select your device.
- Copy the Secret ID shown on the device page.
Step 4: Minimal workflow
Fleet OTA (device template)
Single device (Arduino + Firmngin library)
arduino-sketch: path_to_your_file.ino and write keys.h to the repository root. See Arduino CLI CI/CD for both layouts.
See GitHub Actions for complete workflow examples, all inputs, versioning, and troubleshooting.
Build tool guides
Upload limits and versioning
The action resolves version in this order:
versioninput, if you set it.git describe --tags --always --dirty, if git history is available.- First 12 characters of the commit SHA.
1.2.0 or 2026.07.16).
After a successful run
Security practices
- Never commit API tokens,
keys.h, or device secret keys to git. - Scope tokens to Firmware OTA only.
- Revoke unused tokens from Integrations.
- Use branch protection and required reviews on
mainbefore OTA runs. - Prefer canary or staged_expand policies for production fleets (see Fleet rollout).