Repository navigation
HyperOS AutoPorter Workflow #40
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: HyperOS AutoPorter Workflow | |
| on: | |
| workflow_dispatch: | |
| inputs: | |
| mode: | |
| description: 'Build mode (port = stock+port mix, mod = stock-only modification)' | |
| required: true | |
| default: 'port' | |
| type: choice | |
| options: | |
| - port | |
| - mod | |
| hyper_version: | |
| description: 'HyperOS version (selects modded apps set)' | |
| required: true | |
| default: 'hos4' | |
| type: choice | |
| options: | |
| - hos4 | |
| - hos3 | |
| package_type: | |
| description: 'Package type (universal = recovery + fastboot, fastboot-only = no META-INF)' | |
| required: true | |
| default: 'universal' | |
| type: choice | |
| options: | |
| - universal | |
| - fastboot-only | |
| debloat: | |
| description: 'Debloat list (auto = match hyper_version)' | |
| required: true | |
| default: 'auto' | |
| type: choice | |
| options: | |
| - auto | |
| - hos3 | |
| - hos4 | |
| - none | |
| dsv: | |
| description: 'Apply DSV smali patches - signature checks disabling' | |
| required: true | |
| default: 'yes' | |
| type: choice | |
| options: | |
| - "yes" | |
| - "no" | |
| decrypt_data: | |
| description: 'Decrypt /data (fileencryption -> fileencryptable in fstab)' | |
| required: true | |
| default: 'no' | |
| type: choice | |
| options: | |
| - "yes" | |
| - "no" | |
| ext4_rw: | |
| description: 'Comma-separated partitions to rebuild as ext4 RW (all/none)' | |
| required: false | |
| default: 'product,system' | |
| type: string | |
| ext4_free_mb: | |
| description: 'Free megabytes to keep in each ext4 RW partition' | |
| required: false | |
| default: 150 | |
| type: number | |
| jobs: | |
| build: | |
| name: Build Super Image | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout repository | |
| uses: actions/checkout@v4 | |
| with: | |
| lfs: true | |
| - name: Free Disk Space | |
| run: | | |
| echo "=== Disk space before cleanup ===" | |
| df -h | |
| sudo rm -rf /usr/share/dotnet | |
| sudo rm -rf /usr/local/lib/android | |
| sudo rm -rf /opt/ghc | |
| sudo rm -rf /usr/local/share/boost | |
| sudo docker image prune --all --force || true | |
| echo "=== Disk space after cleanup ===" | |
| df -h | |
| - name: Set up Python | |
| uses: actions/setup-python@v5 | |
| with: | |
| python-version: '3.10' | |
| - name: Install System Dependencies | |
| run: | | |
| sudo apt-get update | |
| sudo apt-get install -y android-sdk-libsparse-utils erofs-utils p7zip-full wget curl default-jre-headless | |
| - name: Install Python Dependencies | |
| run: | | |
| sudo python -m pip install --break-system-packages -r requirements.txt | |
| - name: Run AutoPorter | |
| run: | | |
| sudo python -u autoporter.py --mode ${{ inputs.mode }} --hyper-version ${{ inputs.hyper_version }} --package-type ${{ inputs.package_type }} --debloat ${{ inputs.debloat }} --dsv ${{ inputs.dsv }} --decrypt-data ${{ inputs.decrypt_data }} --ext4-rw "${{ inputs.ext4_rw }}" --ext4-free-mb ${{ inputs.ext4_free_mb }} | |
| - name: Upload build sidecars (debug on failure) | |
| if: failure() | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: sidecars-${{ inputs.mode }}-${{ inputs.hyper_version }} | |
| path: | | |
| extracted_stock/*.fs_config | |
| extracted_stock/*.file_contexts | |
| extracted_port/*.fs_config | |
| extracted_port/*.file_contexts | |
| if-no-files-found: warn | |
| - name: Upload flashable ZIP | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: package-${{ inputs.mode }}-${{ inputs.hyper_version }}-${{ inputs.package_type }} | |
| path: HyperOS-*-duchamp-*.zip | |
| if-no-files-found: error |