From fb29d9c8662ea4f43a52365aaf8bf8794dc074a8 Mon Sep 17 00:00:00 2001 From: ragebreaker <125530737+mlm-games@users.noreply.github.com> Date: Tue, 10 Sep 2024 15:25:28 +0530 Subject: [PATCH] Update test-build.yml --- .github/workflows/test-build.yml | 32 +++++++++++++++++++++++--------- 1 file changed, 23 insertions(+), 9 deletions(-) diff --git a/.github/workflows/test-build.yml b/.github/workflows/test-build.yml index 854b0293..eec32940 100644 --- a/.github/workflows/test-build.yml +++ b/.github/workflows/test-build.yml @@ -3,13 +3,25 @@ name: Test build kernel for 4.4-mtk on: push: branches: - main + - main pull_request: branches: - main + - main workflow_dispatch: + inputs: + defconfig: + description: 'Defconfig file name' + required: true + default: 'your_default_defconfig' + repo_url: + description: 'Kernel repository URL' + required: true + default: 'https://github.com/mlm-games/android_kernel_lenovo_mt8765_P' + branch: + description: 'Repository Branch' + required: true + default: 'stock' - jobs: build: runs-on: ubuntu-latest @@ -20,7 +32,7 @@ jobs: if: env.REMOVE_UNUSED_PACKAGES == 'true' uses: jlumbroso/free-disk-space@main with: - tool-cache: ture + tool-cache: true android: false dotnet: true haskell: true @@ -35,7 +47,9 @@ jobs: - name: Checkout kernel test source run: | - git clone https://github.com/mlm-games/android_kernel_lenovo_mt8765_P -b stock --depth=1 + REPO_NAME=$(basename ${{ github.event.inputs.repo_url }} .git) + git clone ${{ github.event.inputs.repo_url || 'https://github.com/mlm-games/android_kernel_lenovo_mt8765_P' }} -b ${{ inputs.branch }} --depth=1 + echo "REPO_NAME=$REPO_NAME" >> $GITHUB_ENV - name: Kernel build deps run: | @@ -48,7 +62,7 @@ jobs: - name: Add ksu and build kernel using build_kernel.sh run: | - cd android_kernel_lenovo_mt8765_P - curl -LSs "https://raw.githubusercontent.com/mlm-games/KernelSU-Non-GKI/main/kernel/setup-subm.sh" | bash -s - python3 KernelSU/scripts/integrate-no-kprobe.py mt8765_P_defconfig - ./build_kernel.sh mt8765_P_defconfig + cd $REPO_NAME + curl -LSs "https://raw.githubusercontent.com/mlm-games/KernelSU-Non-GKI/main/kernel/setup-subm.sh" | bash -s + python3 KernelSU/scripts/integrate-no-kprobe.py ${{ github.event.inputs.defconfig || 'your_default_defconfig' }} + ./build_kernel.sh