Browse Source

Refactor action.yml to streamline configuration steps

Removed redundant configuration steps and added a new step to enable CONFIG_KSU in defconfig based on input.
jimsterino98 1 month ago
parent
commit
aa6db556f7
1 changed files with 6 additions and 12 deletions
  1. 6 12
      .github/actions/ksun/action.yml

+ 6 - 12
.github/actions/ksun/action.yml

@@ -16,25 +16,19 @@ runs:
         cd "$COMMON"
         curl -LSs "https://raw.githubusercontent.com/KernelSU-Next/KernelSU-Next/next/kernel/setup.sh" | bash -s dev
 
-        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 "$GITHUB_WORKSPACE"
-        cat >> "$GKI_DEFCONFIG" << 'EOF'
-        # KernelSU Configuration
-        CONFIG_KSU=y
-        EOF
 
+    - name: enable in defconfig
+      if: inputs.susfs == 'false'
+      shell: bash
+      run: |
+        "$COMMON/scripts/config" --file "$GKI_DEFCONFIG" --enable CONFIG_KSU
+      
     - name: Extract KSU Version Info and inject into Kbuild
       shell: bash
       run: |