Serverless Over-The-Air (OTA) firmware update library for ESP32 using GitHub as the hosting platform.
ESP32GithubOTA enables ESP32 devices to perform OTA firmware updates directly from GitHub repositories. No dedicated server required!
- Serverless - Uses GitHub as firmware host
- Automatic - Integrates with GitHub Actions
- Secure - MD5 checksum verification
- Simple - Minimal configuration
- Free - No hosting costs
Your GitHub repository must contain:
``` root/ ├── firmware.bin # Compiled firmware binary ├── info.txt # MD5 checksum file └── ... ```
``` 02a4caf5aa544c9bd7c8fa68650ffef7 ./firmware.bin ```
Generate with: ```bash md5sum firmware.bin > info.txt # Linux md5 firmware.bin > info.txt # macOS ```
Add to `platformio.ini`:
```ini lib_deps = https://github.com/kochcodes/ESP32GithubOTA.git ```
Create `.github/workflows/build-and-deploy.yml`:
```yaml name: build and deploy
on: [push]
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v1
with:
fetch-depth: 0
- name: Set up Python
uses: actions/setup-python@v1
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install platformio
- name: Run PlatformIO
run: |
platformio run
mv .pio/build/default/firmware.bin ./firmware.bin
md5sum ./firmware.bin > info.txt
- name: push
uses: actions-x/commit@v2
with:
email: you@your.domain
rebase: true
force: true
name: GitHub Actions Autocommitter
branch: release
files: .
```
This workflow automatically builds firmware, generates checksums, and deploys to a release branch.
MIT License