diff --git a/.github/workflows/Recovery Build.yml b/.github/workflows/Recovery Build.yml index 16aef2333..249768cc5 100644 --- a/.github/workflows/Recovery Build.yml +++ b/.github/workflows/Recovery Build.yml @@ -4,17 +4,17 @@ on: workflow_dispatch: inputs: MANIFEST_URL: - description: 'MANIFEST_URL (if not using SSH keys, use https:// URL)' + description: 'MANIFEST_URL (if using SSH keys, use git@github.com:repo URL format)' required: true - default: 'git@github.com:minimal-manifest-twrp/platform_manifest_twrp_aosp.git' + default: 'https://gitlab.com/OrangeFox/sync.git' MANIFEST_BRANCH: description: 'MANIFEST_BRANCH' required: true - default: 'twrp-12.1' + default: '12.1' DEVICE_TREE_URL: description: 'DEVICE_TREE_URL' required: true - default: 'https://github.com/TeamWin/android_device_asus_I003D' + default: 'https://github.com/MikaelaNeia/android_device_xiaomi_agate-twrp' DEVICE_TREE_BRANCH: description: 'DEVICE_TREE_BRANCH' required: true @@ -22,7 +22,7 @@ on: DEVICE_PATH: description: 'DEVICE_PATH' required: true - default: 'device/asus/I003D' + default: 'device/xiaomi/agate' COMMON_TREE_URL: description: 'COMMON_TREE_URL (if no common tree, leave blank)' required: false @@ -32,21 +32,22 @@ on: DEVICE_NAME: description: 'DEVICE_NAME' required: true - default: 'I003D' + default: 'agate' MAKEFILE_NAME: description: 'MAKEFILE_NAME' required: true - default: 'twrp_I003D' + default: 'twrp_agate' BUILD_TARGET: description: 'BUILD_TARGET' required: true - default: 'recovery' + default: 'boot' jobs: build: if: github.event.repository.owner.id == github.event.sender.id - runs-on: ubuntu-18.04 - # You can use either of the ubuntu-18.04 or ubuntu-20.04 runner + runs-on: ubuntu-20.04 + permissions: + contents: write steps: - name: Display Run Parameters run: | @@ -73,7 +74,7 @@ jobs: 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-dev libxml2 lzop pngcrush schedtool squashfs-tools imagemagick libbz2-dev lzma ncftp qemu-user-static libstdc++-10-dev python + 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 python3 python-is-python3 - name: Install OpenJDK uses: actions/setup-java@v3 @@ -88,11 +89,6 @@ jobs: ssh-private-key: | ${{ secrets.SSH_PRIVATE_KEY }} - - name: Set variables - run: | - echo "::set-output name=date::$(date +%F)" - id: var - - name: Install repo run: | mkdir ~/bin @@ -104,9 +100,9 @@ jobs: run: | mkdir workspace cd workspace - echo "::set-output name=pwd::$(pwd)" - git config --global user.name "Captain Throwback" - git config --global user.email "captainthrowback@hotmail.com" + echo "workspace-folder=$(pwd)" >> $GITHUB_OUTPUT + git config --global user.name "MikaelaNeia" + git config --global user.email "MikaelaNeia0@gmail.com" repo init --depth=1 -u ${{ github.event.inputs.MANIFEST_URL }} -b ${{ github.event.inputs.MANIFEST_BRANCH }} id: pwd @@ -118,7 +114,7 @@ jobs: - 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.pwd }} + working-directory: ${{ steps.pwd.outputs.workspace-folder }} - name: Clone common tree if: | @@ -126,7 +122,7 @@ jobs: && github.event.inputs.COMMON_PATH != null run: | git clone ${{ github.event.inputs.COMMON_TREE_URL }} -b ${{ github.event.inputs.DEVICE_TREE_BRANCH }} ./${{ github.event.inputs.COMMON_PATH }} - working-directory: ${{ steps.pwd.outputs.pwd }} + working-directory: ${{ steps.pwd.outputs.workspace-folder }} - name: Check Build Tree uses: haya14busa/action-cond@v1 @@ -140,7 +136,7 @@ jobs: run: | bash ${GITHUB_WORKSPACE}/scripts/convert.sh ${{ github.event.inputs.DEVICE_PATH }}/${{ steps.buildtree.outputs.value }}.dependencies repo sync -j$(nproc --all) - working-directory: ${{ steps.pwd.outputs.pwd }} + working-directory: ${{ steps.pwd.outputs.workspace-folder }} continue-on-error: true - name: Set Swap Space @@ -148,19 +144,12 @@ jobs: with: swap-size-gb: 12 - - name: Check Build Branch - if: ${{ github.event.inputs.MANIFEST_BRANCH == 'twrp-12.1' }} - run: | - source build/envsetup.sh - repopick 5405 5540 - working-directory: ${{ steps.pwd.outputs.pwd }} - - name: Building recovery run: | source build/envsetup.sh export ALLOW_MISSING_DEPENDENCIES=true lunch ${{ github.event.inputs.MAKEFILE_NAME }}-eng && make clean && make ${{ github.event.inputs.BUILD_TARGET }}image -j$(nproc --all) - working-directory: ${{ steps.pwd.outputs.pwd }} + working-directory: ${{ steps.pwd.outputs.workspace-folder }} - name: Upload to Release uses: softprops/action-gh-release@v1