A high-performance CI/CD pipeline for building AxionOS and other Android ROMs. This system bridges GitHub Actions with a Telegram bot interface, allowing for remote-controlled build management, surgical artifact detection, and real-time monitoring.
Contains the core build logic executed on the self-hosted runner.
build.sh/sync.sh: Core AOSP sync and compilation scripts. Now includes a robust blocking loop to ensure the ROM ZIP is ready before finalizing.tmux_runner.sh: Orchestrates the build within a persistenttmuxsession. Usespipe-panefor high-performance, real-time log streaming with zero CPU overhead.reporter.py: Background monitoring tool. Uses surgical log parsing (Package Complete:) to identify artifacts with 100% accuracy.quota_manager.py: Enforces daily build limits and updates user data via the GitHub API.utils/telegram.py: Shared utility for Telegram API interactions.
The control center for the entire system.
main.py: Entry point for the Telegram bot. Now includes structured logging with a clean terminal interface.handlers/: Modularized command logic.github.py: Build triggers, automatic manifest discovery, and queue management.admin.py: User management, chat authorization, channel redirection, and broadcast tools.
utils.py: Helper functions for bot operations and Redis interactions.
- Smart Manifest Discovery: Just run
/build <codename>. The bot automatically pulls the manifest from theAxionAOSP/device_manifestsrepository. - Zero-Overhead Monitoring: Real-time progress bars and log summaries streamed via high-performance I/O.
- Channel Redirection: Redirect build notifications and artifact reports to a dedicated Telegram channel.
- Surgical Artifact Detection: Extracts the exact output path from build logs to ensure the correct files are uploaded every time.
- Broadcast System: Owner-only
/announcecommand to communicate with all maintainers across all approved groups and channels. - Dynamic Authorization: Easily approve or disapprove groups by ID or directly within the chat.
| Command | Description |
|---|---|
/build <device> [url] |
Start a new build (Auto-finds manifest or uses optional URL). |
/status [device] |
Show real-time ROM build progress. |
/queue |
View the current GitHub Actions workflow queue. |
/history |
View the last 5 build attempts. |
/health |
Monitor server disk, RAM, and runner status. |
/quota |
Check remaining daily build limits. |
/listuser |
List all authorized maintainers. |
/guide |
View detailed build options and manifest templates. |
| Command | Description |
|---|---|
/approvechat [ID] |
Authorize a group for bot usage. |
/disapprovechat [ID] |
Remove a group from the authorized list. |
/listchats |
View all authorized groups and the current output channel. |
/adduser <user> [role] |
Whitelist a new maintainer (Admin/User). |
/removeuser <ID> |
Remove a user from the database. |
/setrole <role> <user> |
Update a user's permissions and limits. |
/setchannel <ID> |
Redirect all build notifications to a specific channel. |
/save |
Force a manual sync of the Redis state to the GitHub DB. |
/cancel <RunID> |
Cancel an active GitHub workflow run. |
| Command | Description |
|---|---|
/announce <msg> |
Broadcast an official announcement to all groups and the main channel. |
/sync |
Force a manual sync of the GitHub DB to the Redis cache. |
/addquota <user> <lim> |
Set a custom daily build limit for a specific user. |
The /build command triggers an interactive menu to customize your build:
- Type: Toggle build type (user, userdebug, eng).
- GMS: Choose variant (Core, Pico, Vanilla).
- Clean: Toggle
mka cleanbefore building. - Target: Dynamically redirects to your main channel if configured.
Once a build is complete, you get a premium delivery card:
- 💿 DOWNLOAD ROM ZIP: Primary artifact link.
- 📥 IMAGE ARTIFACTS: Boot, Recovery, and Vendor images grouped for a clean UI.
- 📄 OTA JSON: Direct link to the generated release metadata.
The bot saves structured logs to telegram-bot/bot.log while maintaining a clean, human-readable terminal output. Monitor them in real-time:
tail -f telegram-bot/bot.logMonitor the raw build environment from the server:
TMUX= tmux attach -t axion_build