ci: Use Gitea release URL for OTA instead of local HTTP server
All checks were successful
Lint & Build / Security Flaw Analysis (push) Successful in 15s
Lint & Build / Secret Scanning (push) Successful in 5s
Lint & Build / C/C++ Static Analysis (push) Successful in 27s
Lint & Build / Build Firmware (push) Has been skipped
Lint & Build / Deploy to ESP Fleet (push) Successful in 4m24s
All checks were successful
Lint & Build / Security Flaw Analysis (push) Successful in 15s
Lint & Build / Secret Scanning (push) Successful in 5s
Lint & Build / C/C++ Static Analysis (push) Successful in 27s
Lint & Build / Build Firmware (push) Has been skipped
Lint & Build / Deploy to ESP Fleet (push) Successful in 4m24s
This commit is contained in:
@@ -203,24 +203,14 @@ jobs:
|
|||||||
- name: Deploy via OTA
|
- name: Deploy via OTA
|
||||||
run: |
|
run: |
|
||||||
SENSORS="muddy-storm:192.168.129.29 amber-maple:192.168.129.30 hollow-acorn:192.168.129.31"
|
SENSORS="muddy-storm:192.168.129.29 amber-maple:192.168.129.30 hollow-acorn:192.168.129.31"
|
||||||
OTA_PORT=8899
|
|
||||||
EXPECTED_VERSION="${{ github.ref_name }}"
|
EXPECTED_VERSION="${{ github.ref_name }}"
|
||||||
|
|
||||||
# Get runner IP (first non-loopback interface)
|
# Use Gitea release URL (uploaded in previous step)
|
||||||
RUNNER_IP=$(hostname -I | awk '{print $1}')
|
FIRMWARE_URL="https://git.mymx.me/${{ github.repository }}/releases/download/${{ github.ref_name }}/csi_recv_router.bin"
|
||||||
echo "Runner IP: $RUNNER_IP"
|
|
||||||
|
|
||||||
# Start HTTP server to serve firmware
|
|
||||||
cd get-started/csi_recv_router/build
|
|
||||||
python3 -m http.server $OTA_PORT &
|
|
||||||
HTTP_PID=$!
|
|
||||||
sleep 2
|
|
||||||
|
|
||||||
FIRMWARE_URL="http://${RUNNER_IP}:${OTA_PORT}/csi_recv_router.bin"
|
|
||||||
echo "Firmware URL: $FIRMWARE_URL"
|
echo "Firmware URL: $FIRMWARE_URL"
|
||||||
|
|
||||||
# Verify server is running
|
# Verify firmware is accessible
|
||||||
curl -sI "http://localhost:${OTA_PORT}/csi_recv_router.bin" | head -1
|
curl -sI "$FIRMWARE_URL" | head -1
|
||||||
|
|
||||||
# Deploy to all sensors in parallel
|
# Deploy to all sensors in parallel
|
||||||
echo "=== Deploying to all sensors in parallel ==="
|
echo "=== Deploying to all sensors in parallel ==="
|
||||||
@@ -269,9 +259,6 @@ jobs:
|
|||||||
fi
|
fi
|
||||||
done
|
done
|
||||||
|
|
||||||
# Stop HTTP server
|
|
||||||
kill $HTTP_PID 2>/dev/null || true
|
|
||||||
|
|
||||||
# Final status
|
# Final status
|
||||||
echo "=== Final sensor status ==="
|
echo "=== Final sensor status ==="
|
||||||
for entry in $SENSORS; do
|
for entry in $SENSORS; do
|
||||||
|
|||||||
Reference in New Issue
Block a user