Skip to content

Commit 93724bf

Browse files
Hacker-CBHacker-CB
authored andcommitted
Restore and enhance documentation for Docker images
Add explicit instructions and examples for using Docker images alongside GitHub Actions in the main README.md file, including a comparison table. Replit-Commit-Author: Agent Replit-Commit-Session-Id: a3d20cb2-655b-4547-b85e-fad1418c5c73 Replit-Commit-Checkpoint-Type: full_checkpoint
1 parent 2a41c4e commit 93724bf

File tree

1 file changed

+66
-50
lines changed

1 file changed

+66
-50
lines changed

README.md

Lines changed: 66 additions & 50 deletions
Original file line numberDiff line numberDiff line change
@@ -1,24 +1,34 @@
11
# JetHome Development Environment
22

3-
Reusable GitHub Actions for embedded development with PlatformIO.
3+
Development tools for embedded systems with PlatformIO - available as both GitHub Actions and Docker images.
44

55
## Quick Start
66

7-
Add to your workflow:
7+
### Option 1: GitHub Action (Recommended)
8+
9+
Fast, cached PlatformIO installation using GitHub Actions:
810

911
```yaml
1012
- uses: jethome-iot/jethome-dev/.github/actions/setup-platformio@v1
1113
- run: pio run
1214
```
1315
14-
## Available Actions
16+
### Option 2: Docker Image
17+
18+
Use pre-built Docker images with PlatformIO:
19+
20+
```bash
21+
docker pull ghcr.io/jethome-iot/jethome-dev-platformio:latest
22+
```
23+
24+
## GitHub Actions
1525

1626
### setup-platformio
1727

1828
Install and cache PlatformIO Core with support for ESP-IDF framework on ESP32 microcontrollers.
1929

2030
**Features:**
21-
- ⚡ Fast installation with intelligent caching
31+
- ⚡ Fast installation with intelligent caching (50-80% faster than Docker)
2232
- 📌 Optional version pinning for reproducible builds
2333
- 🔧 Python 3.12 by default (configurable)
2434
- 💾 Automatic caching of pip and PlatformIO packages
@@ -44,35 +54,42 @@ steps:
4454
4555
See [full documentation](.github/actions/setup-platformio/README.md) for more examples.
4656
47-
## Why Use These Actions?
57+
## Docker Images
4858
49-
- **Faster CI/CD** - Intelligent caching reduces build time by 50-80%
50-
- **Consistent Builds** - Pin versions for reproducible builds
51-
- **Simple Integration** - One line to add PlatformIO to any workflow
52-
- **Cost Effective** - Reduce GitHub Actions minutes with caching
53-
- **No Docker Overhead** - Direct installation is faster than container pulls
59+
### jethome-dev-platformio
5460
55-
## Example Workflows
61+
Pre-configured Docker image with PlatformIO and ESP32 support.
62+
63+
**Available Tags:**
5664
57-
### Build ESP32 Project
65+
| Tag | Description |
66+
|-----|-------------|
67+
| `latest`, `stable` | Latest stable release |
68+
| `dev` | Development version |
69+
| `YYYY.MM.DD` | Date-versioned releases |
70+
| `monthly-YYYYMMDD` | Monthly rebuilds |
71+
72+
**Usage in GitHub Actions:**
5873

5974
```yaml
60-
name: Build ESP32 Firmware
61-
on: [push]
75+
- name: Build with Docker
76+
run: docker run --rm -v $(pwd):/workspace ghcr.io/jethome-iot/jethome-dev-platformio:latest pio run
77+
```
6278

63-
jobs:
64-
build:
65-
runs-on: ubuntu-latest
66-
steps:
67-
- uses: actions/checkout@v4
68-
- uses: jethome-iot/jethome-dev/.github/actions/setup-platformio@v1
69-
- run: pio run -e esp32
79+
**Local Usage:**
80+
81+
```bash
82+
docker run --rm -v $(pwd):/workspace ghcr.io/jethome-iot/jethome-dev-platformio:latest pio run
7083
```
7184

72-
### Matrix Build for Multiple Boards
85+
See [Docker image documentation](./images/platformio/README.md) for details.
86+
87+
## Example Workflows
88+
89+
### Using GitHub Action
7390

7491
```yaml
75-
name: Multi-Board Build
92+
name: Build ESP32 Firmware
7693
on: [push]
7794
7895
jobs:
@@ -87,49 +104,48 @@ jobs:
87104
- run: pio run -e ${{ matrix.board }}
88105
```
89106

90-
### Run Unit Tests
107+
### Using Docker Image
91108

92109
```yaml
93-
name: Test
110+
name: Build with Docker
94111
on: [push]
95112
96113
jobs:
97-
test:
114+
build:
98115
runs-on: ubuntu-latest
99116
steps:
100117
- uses: actions/checkout@v4
101-
- uses: jethome-iot/jethome-dev/.github/actions/setup-platformio@v1
102-
- run: pio test -e native
118+
- name: Build firmware
119+
run: docker run --rm -v $(pwd):/workspace ghcr.io/jethome-iot/jethome-dev-platformio:latest pio run
103120
```
104121

105-
## Migration from Docker
122+
## Comparison: Action vs Docker
106123

107-
If you're currently using Docker images for PlatformIO:
124+
| Feature | GitHub Action | Docker Image |
125+
|---------|---------------|--------------|
126+
| **Speed** | ✅ Faster (caching) | ⏱️ Slower (image pull) |
127+
| **Cache** | ✅ Native GitHub cache | ❌ Limited caching |
128+
| **Setup** | ✅ One line | ⚙️ Requires Docker |
129+
| **Flexibility** | ✅ Configurable Python/version | ⚙️ Pre-configured |
130+
| **Local dev** | ❌ CI/CD only | ✅ Works locally |
131+
| **Hardware access** | ✅ Direct access | ❌ Limited in containers |
108132

109-
**Before (Docker):**
110-
```yaml
111-
- name: Build with Docker
112-
run: docker run --rm -v $(pwd):/workspace ghcr.io/jethome-iot/platformio:latest pio run
113-
```
133+
**Recommendation:** Use GitHub Action for CI/CD workflows, Docker for local development.
114134

115-
**After (Action):**
116-
```yaml
117-
- uses: jethome-iot/jethome-dev/.github/actions/setup-platformio@v1
118-
- run: pio run
119-
```
135+
## Supported Platforms
120136

121-
Benefits:
122-
- ✅ Faster builds (no Docker pull/start overhead)
123-
- ✅ Better caching (GitHub's native cache)
124-
- ✅ Simpler workflow syntax
125-
- ✅ Direct hardware access if needed
137+
Both options support:
138+
- **ESP32** - All variants (ESP32, S2, S3, C3, C6) via ESP-IDF framework
139+
- **Native** - For unit testing with Unity framework
140+
- **Operating Systems** - Linux, macOS, Windows (Action only for all three)
126141

127-
## Supported Platforms
142+
## CI/CD
128143

129-
The action has been tested with:
130-
- **ESP32** - All variants (ESP32, S2, S3, C3, C6)
131-
- **Native** - For unit testing
132-
- **Operating Systems** - Ubuntu, macOS, Windows
144+
Docker images are automatically built and published to GHCR when:
145+
- Changes are pushed to `master` branch (tagged as `latest`, `stable`, and date-versioned)
146+
- Changes are pushed to `dev` branch (tagged as `dev`, `dev-YYYYMMDD`)
147+
- Monthly scheduled rebuild on the 1st of each month (tagged as `monthly-YYYYMMDD`)
148+
- Manual workflow dispatch (tagged as `manual-YYYYMMDD-HHMMSS`)
133149

134150
## Contributing
135151

0 commit comments

Comments
 (0)