Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
30 changes: 20 additions & 10 deletions .github/workflows/Recovery Build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,9 @@ name: Recovery Build
on:
workflow_dispatch:
inputs:
VERSION_TAGS:
description: Write version name or any custom text.
required: false
MANIFEST_BRANCH:
type: choice
description: Manifest Branch
Expand All @@ -18,19 +21,19 @@ on:
DEVICE_TREE_URL:
description: Device Tree URL
required: true
default: https://github.com/TeamWin/android_device_asus_I003D
default: https://github.com/himelpvz/android_device_xiaomi_sunstone.git
DEVICE_TREE_BRANCH:
description: Device Tree Branch
required: true
default: android-12.1
default: main
DEVICE_PATH:
description: Path the device tree should be synced to, relative to source root
required: true
default: device/asus/I003D
default: device/xiaomi/sunstone
DEVICE_NAME:
description: Device Name from tree (should match name on twrp_<DEVICE_NAME>.mk)
required: true
default: I003D
default: sunstone
REPOPICK_PATCHES:
description: (Optional) Gerrit commit numbers separated by a space to be included in the build (leave blank if not using)
type: string
Expand All @@ -43,21 +46,23 @@ on:
- recovery
- vendor_boot
required: true
default: recovery
default: boot
RECOVERY_INSTALLER:
description: Include recovery installer zip
type: boolean
required: true
default: false

jobs:
build:
build:
name: ${{ github.event.inputs.VERSION_TAGS }}
if: github.event.repository.owner.id == github.event.sender.id
runs-on: ubuntu-20.04
runs-on: ubuntu-22.04
# You can use either of the ubuntu-20.04 or ubuntu-22.04 runner
steps:
- name: Display Run Parameters
run: |
echo "Version Tag: ${{ inputs.VERSION_TAGS }}"
echo "::group::User Environment Variables"
echo "Manifest Branch: ${{ inputs.MANIFEST_BRANCH }}"
echo "Device Tree URL: ${{ inputs.DEVICE_TREE_URL }}"
Expand Down Expand Up @@ -238,6 +243,7 @@ jobs:
fi
lunch twrp_${{ inputs.DEVICE_NAME }}-eng && make $(tr -d _ <<< ${{ inputs.BUILD_TARGET }})image -j$(nproc --all)
working-directory: workspace


- name: Building recovery (Omni)
if: ${{ steps.buildtree.outputs.value == 'omni' }}
Expand All @@ -250,19 +256,23 @@ jobs:
fi
lunch ${{ steps.buildtree.outputs.value }}_${{ inputs.DEVICE_NAME }}-eng && make ${{ inputs.BUILD_TARGET }}image -j$(nproc --all)
working-directory: workspace

- name: ls pwd and directory
run: |
ls -lR workspace/out/target/product/${{ inputs.DEVICE_NAME }}/
- name: Upload to Release
uses: softprops/action-gh-release@4634c16e79c963813287e889244c50009e7f0981
with:
files: |
workspace/out/target/product/${{ inputs.DEVICE_NAME }}/${{ inputs.BUILD_TARGET }}.img
workspace/out/target/product/${{ inputs.DEVICE_NAME }}/*installer*zip
workspace/out/target/product/${{ inputs.DEVICE_NAME }}/obj/PACKAGING/vendor_ramdisk_fragments_intermediates/recovery.*
workspace/out/target/product/${{ inputs.DEVICE_NAME }}/obj/PACKAGING/vendor_boot_intermediates/vendor_ramdisk.*
workspace/out/target/product/${{ inputs.DEVICE_NAME }}/ramdisk-recovery.*
name: ${{ inputs.DEVICE_NAME }} (TWRP)
workspace/out/target/product/${{ inputs.DEVICE_NAME }}/vendor_ramdisk.*
name: ${{ inputs.MANIFEST_BRANCH }}_${{ inputs.DEVICE_NAME }} (TWRP)
tag_name: ${{ github.run_id }}
body: |
Manifest: ${{ inputs.MANIFEST_BRANCH }}
Target: ${{ inputs.BUILD_TARGET }}.img
Version: ${{ inputs.MANIFEST_BRANCH }}
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}