How adeveloper79/action-recovery-builder works
Project Type & Purpose
• This repo is a GitHub Actions–powered build automation tool that compiles custom Android recoveries (TWRP, OrangeFox, PBRP, SHRP).
• It’s not a web app or microservice; it’s a CI/CD pipeline definition plus helper scripts and templates.
Top-Level Components
a. GitHub Events & Triggers
• User forks the repo or clicks “Run workflow” on the “Recovery Build” Action.
• A push or manual dispatch event triggers the .github/workflows/Recovery Build.yml workflow.
b. GitHub Actions Runner
• Hosted runner (Ubuntu VM) that executes the workflow steps.
c. Workflow Definition (.github/workflows/Recovery Build.yml)
• Defines jobs, build matrix (branches for TWRP/OrangeFox/PBRP/SHRP), environment variables (the parameters from README), and step ordering.
d. Helper Script (scripts/convert.sh)
• Handles building logic, parameter parsing, environment setup, conversion of build artifacts.
e. XML Templates (templates/installer.xml, templates/roomservice.xml)
• Provide optional installer and RoomService packaging instructions injected into the build.
f. External Services & Repositories
• AOSP manifests: minimal-manifest-twrp, OrangeFox sync, PitchBlack, SHRP manifest repos
• Gerrit (for REPOPICK_PATCHES)
• GitHub Releases (artifact storage endpoint)
g. Outputs / Artifacts
• Compiled recovery .img and optional installer ZIP uploaded to the GitHub Releases page for download.
Relationships & Data Flow
• Trigger → Runner → Checkout repo → Set up Android build environment →
• Fetch manifest & device tree (from user-specified URLs/branches) →
• Apply optional Gerrit patches →
• Execute convert.sh to compile recovery + package with XML templates →
• Upload artifacts to Releases.
Architectural Patterns & Principles
• Event-driven CI pipeline: each workflow run is an isolated, stateless job.
• Parameterization: environment variables drive multi-branch, multi-flavor builds.
• Reuse of templates/scripts: separation of concerns—YAML for orchestration, shell script for build logic, XML for packaging metadata.
Relevant Technologies & Frameworks
• GitHub Actions (YAML-based workflows, hosted Ubuntu runners)
• Bash scripting (scripts/convert.sh)
• Android build system (AOSP, device trees, manifests)
• XML templating for RoomService & installer packaging
• Git/Gerrit for source control and patch management