Jelajahi Sumber

Refactor zeromount action to use environment variables

Updated patch file references to use environment variables instead of inputs.
jimsterino98 1 bulan lalu
induk
melakukan
ed6edee733
1 mengubah file dengan 5 tambahan dan 12 penghapusan
  1. 5 12
      .github/actions/zeromount/action.yml

+ 5 - 12
.github/actions/zeromount/action.yml

@@ -1,12 +1,5 @@
 name: Add zeromount
 description: add zeromount to kernel
-inputs:
-  android_version:
-   description: 'Android version (android14)'
-   required: true
-  kernel_version:
-   description: 'kernel version (6.1)'
-   required: true
 
 runs:
  using: composite
@@ -24,10 +17,10 @@ runs:
      echo "adding zeromount..."
             
       cd "$COMMON"
-      cp "$ZEROMOUNT/${{ inputs.android_version }}-${{ inputs.kernel_version }}/WildKSU/patches/60_zeromount-${{ inputs.android_version }}-${{ inputs.kernel_version }}.patch" .
-      #patch -p1 < 51_enhanced_susfs_gki-${{ inputs.android_version }}-${{ inputs.kernel_version }}.patch || true
-      patch -p1 < 60_zeromount-${{ inputs.android_version }}-${{ inputs.kernel_version }}.patch || true
-      rm -rf 60_zeromount-${{ inputs.android_version }}-${{ inputs.kernel_version }}.patch
+      cp "$ZEROMOUNT/$ANDROID_VERSION-$KERNEL_VERSION/WildKSU/patches/60_zeromount-$ANDROID_VERSION-$KERNEL_VERSION.patch" .
+      #patch -p1 < 51_enhanced_susfs_gki-$ANDROID_VERSION-$KERNEL_VERSION.patch || true
+      patch -p1 < 60_zeromount-$ANDROID_VERSION-$KERNEL_VERSION.patch || true
+      rm -rf 60_zeromount-$ANDROID_VERSION-$KERNEL_VERSION.patch
 
       if [ -f fs/proc/task_mmu.c.rej ]; then
         echo "Fixing task_mmu.c..."
@@ -53,7 +46,7 @@ runs:
             perl -0pi -e 's@(config IO_WQ\n\tbool\n)@\1\nconfig ZEROMOUNT\n\tbool "ZeroMount Path Redirection Subsystem"\n\tdefault y\n\thelp\n\t  ZeroMount allows path redirection and virtual file injection\n\t  without mounting filesystems. Useful for systemless modifications.\n\n@' fs/Kconfig
         fi
       fi
-      #patch -p1 < 70_ksu_safety-wksu-${{ inputs.kernel_version }}.patch || true
+      #patch -p1 < 70_ksu_safety-wksu-$KERNEL_VERSION.patch || true
 
   - name: apply zeromount patches
     shell: bash