From 4687818b7e27f48e72883a28781fe76792892217 Mon Sep 17 00:00:00 2001 From: Sakshi Agrawal <81718060+sakshiagrwal@users.noreply.github.com> Date: Wed, 12 Jun 2024 18:05:38 +0530 Subject: [PATCH] Build TWRP for Redmi Note 11 Signed-off-by: Sakshi Aggarwal <81718060+sakshiagrwal@users.noreply.github.com> --- .github/workflows/Recovery Build.yml | 49 +++++++++++++--------------- 1 file changed, 22 insertions(+), 27 deletions(-) diff --git a/.github/workflows/Recovery Build.yml b/.github/workflows/Recovery Build.yml index fdfed708..238873ef 100644 --- a/.github/workflows/Recovery Build.yml +++ b/.github/workflows/Recovery Build.yml @@ -6,7 +6,7 @@ on: MANIFEST_URL: description: "MANIFEST_URL" required: true - default: "https://github.com/minimal-manifest-twrp/platform_manifest_twrp_aosp" + default: "https://github.com/minimal-manifest-twrp/platform_manifest_twrp_aosp.git" MANIFEST_BRANCH: description: "MANIFEST_BRANCH" required: true @@ -14,7 +14,7 @@ on: DEVICE_TREE_URL: description: "DEVICE_TREE_URL" required: true - default: "https://github.com/deedev-projects/device_xiaomi_spes-twrp" + default: "https://github.com/sakshiagrwal/device_xiaomi_spes-TWRP.git" DEVICE_TREE_BRANCH: description: "DEVICE_TREE_BRANCH" required: true @@ -38,10 +38,10 @@ on: jobs: build: - if: github.event.repository.owner.id == github.event.sender.id - runs-on: ubuntu-20.04 + runs-on: ubuntu-latest permissions: contents: write + steps: - name: Display Run Parameters run: | @@ -56,41 +56,36 @@ jobs: echo "Build Target: ${{ github.event.inputs.BUILD_TARGET }}.img" echo "::endgroup::" - # You might want to Checkout your repo first, but not mandatory - - name: Check Out - uses: actions/checkout@v3 + - name: Checkout + uses: actions/checkout@v4 - # Cleanup The Actions Workspace Using Custom Composite Run Actions - name: Cleanup uses: rokibhasansagar/slimhub_actions@main - # That's it! Now use your normal steps - - name: Prepare the environment + - name: Prepare Environment run: | - sudo apt update - sudo apt -y upgrade - sudo apt -y install gperf gcc-multilib gcc-10-multilib g++-multilib g++-10-multilib libc6-dev lib32ncurses5-dev x11proto-core-dev libx11-dev tree lib32z-dev libgl1-mesa-dev libxml2-utils xsltproc bc ccache lib32readline-dev lib32z1-dev liblz4-tool libncurses5-dev libsdl1.2-dev libwxgtk3.0-gtk3-dev libxml2 lzop pngcrush schedtool squashfs-tools imagemagick libbz2-dev lzma ncftp qemu-user-static libstdc++-10-dev libncurses5 python + sudo apt-get install -y gperf gcc-multilib gcc-10-multilib g++-multilib g++-10-multilib lib32ncurses5-dev x11proto-core-dev lib32z-dev libgl1-mesa-dev libxml2-utils xsltproc ccache lib32readline-dev lib32z1-dev liblz4-tool libncurses5-dev libsdl1.2-dev libwxgtk3.0-gtk3-dev lzop pngcrush schedtool squashfs-tools imagemagick libbz2-dev lzma ncftp qemu-user-static libstdc++-10-dev libncurses5 - name: Install OpenJDK - uses: actions/setup-java@v3 + uses: actions/setup-java@v4 with: distribution: "zulu" java-version: "8" - - name: Install repo + - name: Install Repo run: | - mkdir ~/bin - curl https://storage.googleapis.com/git-repo-downloads/repo > ~/bin/repo - chmod a+x ~/bin/repo - sudo ln -sf ~/bin/repo /usr/bin/repo + mkdir -p ~/.bin + curl https://storage.googleapis.com/git-repo-downloads/repo > ~/.bin/repo + chmod a+rx ~/.bin/repo + sudo ln -sf ~/.bin/repo /usr/bin/repo - - name: Initialize repo + - name: Initialize Repo run: | mkdir workspace cd workspace echo "workspace-folder=$(pwd)" >> $GITHUB_OUTPUT - git config --global user.name ${{ github.repository_owner }} - git config --global user.email "81718060+sakshiagrwal@users.noreply.github.com" + git config --global user.name "github-actions[bot]" + git config --global user.email "41898282+github-actions[bot]@users.noreply.github.com" repo init --depth=1 -u ${{ github.event.inputs.MANIFEST_URL }} -b ${{ github.event.inputs.MANIFEST_BRANCH }} id: pwd @@ -99,7 +94,7 @@ jobs: repo sync -j$(nproc --all) --force-sync working-directory: workspace - - name: Clone device tree + - name: Clone Device Tree run: | git clone ${{ github.event.inputs.DEVICE_TREE_URL }} -b ${{ github.event.inputs.DEVICE_TREE_BRANCH }} ./${{ github.event.inputs.DEVICE_PATH }} working-directory: ${{ steps.pwd.outputs.workspace-folder }} @@ -124,21 +119,21 @@ jobs: with: swap-size-gb: 12 - - name: Building recovery + - name: Building Recovery run: | source build/envsetup.sh lunch ${{ github.event.inputs.MAKEFILE_NAME }}-eng && make clean && make ${{ github.event.inputs.BUILD_TARGET }}image -j$(nproc --all) working-directory: ${{ steps.pwd.outputs.workspace-folder }} - - name: Upload to Release - uses: softprops/action-gh-release@v1 + - name: Github Release + uses: softprops/action-gh-release@v2 with: files: workspace/out/target/product/${{ github.event.inputs.DEVICE_NAME }}/${{ github.event.inputs.BUILD_TARGET }}.img name: ${{ github.event.inputs.DEVICE_NAME }}-${{ github.run_id }} tag_name: ${{ github.run_id }} body: | ### TeamWin Recovery Project v3.7.0 - + **_Device: ${{ github.event.inputs.DEVICE_NAME }}_** **_Target: ${{ github.event.inputs.BUILD_TARGET }}.img_** **_Device Tree: [URL](${{ github.event.inputs.DEVICE_TREE_URL }}/tree/${{ github.event.inputs.DEVICE_TREE_BRANCH }})_**