Эх сурвалжийг харах

Add GitHub Action to clone dependencies

This action clones necessary dependencies based on input parameters, including Android and kernel versions, and conditionally checks out specific commits for SUSFS based on version combinations.
jimsterino98 4 сар өмнө
parent
commit
e0e03a0b51

+ 45 - 0
.github/actions/dependencies/action.yml

@@ -0,0 +1,45 @@
+name: clone dependencies
+description: dependencies
+inputs:
+ android_version:
+    description: 'Android version (e.g., android15)'
+    required: true
+ kernel_version:
+    description: 'Kernel version (e.g., 6.6)'
+    required: true
+ zeromount:
+    description: 'zeromount'
+    required: true
+ susfs:
+    description: 'SUSFS'
+    required: true
+
+runs:
+ using: composite
+ steps:
+  - name: clone susfs and change commit if necessary, and clone kernel patches
+    shell: bash
+    run: |
+     ANYKERNEL_BRANCH="gki-2.0"
+     git clone https://github.com/WildKernels/kernel_patches.git
+     git clone https://github.com/WildKernels/AnyKernel3.git -b "$ANYKERNEL_BRANCH"
+     if [[ ${{ inputs.zeromount }} == 'true' ]]; then
+      git clone https://github.com/jimsterino98/Super-Builders.git
+     fi
+
+     if [[ ${{ inputs.susfs }} == 'true' ]]; then
+      SUSFS_BRANCH="gki-${{ inputs.android_version }}-${{ inputs.kernel_version }}"
+      git clone https://gitlab.com/simonpunk/susfs4ksu.git -b "$SUSFS_BRANCH"
+     
+      cd susfs4ksu
+      if [[ "${{ inputs.android_version }}-${{ inputs.kernel_version }}" == "android12-5.10" ]]; then
+        COMMIT=674f72b6f683e837d7f557704cabe00a83eeb0b4
+      elif [[ "${{ inputs.android_version }}-${{ inputs.kernel_version }}" == "android13-5.15" ]]; then
+        COMMIT=eaa5d299dd85a4230f936b94dc5dd8303f27130a
+      elif [[ "${{ inputs.android_version }}-${{ inputs.kernel_version }}" == "android14-6.1" ]]; then
+        COMMIT=971cc4e770b7f344a4df35ce92d7a859e6a1e0fd
+      elif [[ "${{ inputs.android_version }}-${{ inputs.kernel_version }}" == "android15-6.6" ]]; then
+        COMMIT=85bcfac5edc8ba7808581e8d0a3ca9c7deca78e4
+      fi
+      git checkout "$COMMIT"
+     fi