Преглед на файлове

Enhance KernelSU-Next setup with susfs input

Added conditional setup for KernelSU-Next with and without susfs input.
jimsterino98 преди 3 месеца
родител
ревизия
f51f644cb1
променени са 1 файла, в които са добавени 35 реда и са изтрити 5 реда
  1. 35 5
      .github/actions/ksun/action.yml

+ 35 - 5
.github/actions/ksun/action.yml

@@ -1,20 +1,50 @@
 name: Set up KernelSU-Next
 description: download and set up KSUN into the kernel source
+inputs:
+ susfs:
+  description: 'susfs'
+  required: true
 
 
 runs:
   using: composite
   steps:
-    - name: Setup KSUN
+    - name: Setup KSUN with no susfs
+      if: inputs.susfs == 'false'
       shell: bash
       run: |
         cd "$COMMON"
-        curl -LSs "https://raw.githubusercontent.com/KernelSU-Next/KernelSU-Next/next/kernel/setup.sh" | bash -s dev
+        curl -LSs "https://raw.githubusercontent.com/pershoot/KernelSU-Next/dev-susfs/kernel/setup.sh" | bash -s dev
 
-        cd KernelSU-Next
-        git checkout c2013a15ae1eaca69032fa6016ffefb70adf6146
+        #cd KernelSU-Next
+        #git checkout c2013a15ae1eaca69032fa6016ffefb70adf6146
 
-        cd kernel
+        cd KernelSU-Next/kernel
+        COMMITS_COUNT=$(/usr/bin/git rev-list --count HEAD)
+        BASE_VERSION=30000
+        KSU_VERSION=$(expr $COMMITS_COUNT "+" $BASE_VERSION)
+        sed -i "s/^KSU_VERSION_FALLBACK := 1$/KSU_VERSION_FALLBACK := ${KSU_VERSION}/" Kbuild
+
+        KSU_GIT_TAG="$(git describe --tags --abbrev=0 2>/dev/null || echo "v0.0.1")"
+        sed -i "s/^KSU_VERSION_TAG_FALLBACK := v0.0.1$/KSU_VERSION_TAG_FALLBACK := ${KSU_GIT_TAG}/" Kbuild
+
+        cd "$GITHUB_WORKSPACE"
+        cat >> "$GKI_DEFCONFIG" << 'EOF'
+        # KernelSU Configuration
+        CONFIG_KSU=y
+        EOF
+
+    - name: Setup pershoot KSUN with susfs
+      if: inputs.susfs == 'true'
+      shell: bash
+      run: |
+        cd "$COMMON"
+        curl -LSs "https://raw.githubusercontent.com/pershoot/KernelSU-Next/dev-susfs/kernel/setup.sh" | bash -s dev-susfs
+
+        #cd KernelSU-Next
+        #git checkout c2013a15ae1eaca69032fa6016ffefb70adf6146
+
+        cd KernelSU-Next/kernel
         COMMITS_COUNT=$(/usr/bin/git rev-list --count HEAD)
         BASE_VERSION=30000
         KSU_VERSION=$(expr $COMMITS_COUNT "+" $BASE_VERSION)