GitHub Action to build firmware (PlatformIO / Arduino CLI) and upload to Firmngin OTA.
- Generate an API token in Firmngin → Integrations (scope: Firmware OTA)
- In your GitHub repo → Settings → Secrets and variables → Actions
- Secret:
FIRMNGIN_API_TOKEN= token from the dashboard - Variable:
FIRMNGIN_DEVICE_TEMPLATE_ID= device template UUID (fleet OTA) - Variable:
FIRMNGIN_DEVICE_SECRET_ID= device secret ID (single device, no template)
- Secret:
name: Firmngin OTA
on:
push:
branches:
- main
permissions:
contents: read
jobs:
ota:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: firmngin/ota@v1.1
with:
token: ${{ secrets.FIRMNGIN_API_TOKEN }}
device-template-id: ${{ vars.FIRMNGIN_DEVICE_TEMPLATE_ID }} - uses: firmngin/ota@v1.1
with:
token: ${{ secrets.FIRMNGIN_API_TOKEN }}
device-secret-id: ${{ vars.FIRMNGIN_DEVICE_SECRET_ID }}| Input | Required | Description |
|---|---|---|
token |
yes | fng_pat_...@host with Firmware OTA scope |
device-template-id |
no* | Device template UUID (fleet OTA via policy) |
device-secret-id |
no* | Device secret ID (upload + deploy to one device) |
target-board |
no* | Board name |
target-model |
no* | Board model |
platform |
no | auto, platformio, or arduino |
platformio-env |
no | PlatformIO environment name |
arduino-fqbn |
no | Arduino FQBN (e.g. esp32:esp32:esp32) |
version |
no | Firmware version override |
release-notes |
no | Release notes |
* One of: device-template-id, device-secret-id, or target-board + target-model is required.