Преглед изворни кода

refactor: update Bazel build command and reorganize artifact gathering steps

TheWildJames пре 3 месеци
родитељ
комит
5a285f50ab
1 измењених фајлова са 15 додато и 10 уклоњено
  1. 15 10
      .github/actions/build-kernel/action.yml

+ 15 - 10
.github/actions/build-kernel/action.yml

@@ -82,8 +82,8 @@ runs:
             --lto=default \
             --defconfig_fragment=//common:arch/arm64/configs/wild_gki.fragment \
             --disk_cache=/home/runner/.cache/bazel \
-            --dist_dir=dist \
-            //common:kernel_aarch64_dist
+            //common:kernel_aarch64_dist \
+            -- --dist_dir=dist
         else
           tools/bazel build \
             --config=fast \
@@ -91,8 +91,8 @@ runs:
             --lto=default \
             --defconfig_fragment=//common:arch/arm64/configs/wild_gki.fragment \
             --disk_cache=/home/runner/.cache/bazel \
-            --distdir=dist \
-            //common:kernel_aarch64_dist
+            //common:kernel_aarch64_dist \
+            -- --distdir=dist
         fi
         tools/bazel info output_base
       fi
@@ -102,15 +102,9 @@ runs:
 
   - name: 'Gather Build Artifacts'
     shell: bash
-    if: inputs.bypass == true
     working-directory: ${{ github.workspace }}
     run: |
       set -euo pipefail
-      PATCH_FILE="${{ github.action_path }}/patches/bypass.patch"
-      if [ -f "$PATCH_FILE" ]; then
-        patch -d "${{ github.workspace }}/AnyKernel3" -p1 < "$PATCH_FILE"
-      fi
-
       if [ -f "${{ github.workspace }}/kernel/out/${{ inputs.version }}/dist/Image" ]; then
         if [[ ${{ inputs.bypass }} == "true" ]]; then
           cp "${{ github.workspace }}/kernel/out/${{ inputs.version }}/dist/Image" "${{ github.workspace }}/AnyKernel3/Bypass-Image"
@@ -130,3 +124,14 @@ runs:
 
       exit 1
 
+  - name: 'Gather Build Artifacts'
+    shell: bash
+    if: inputs.bypass == true
+    working-directory: ${{ github.workspace }}
+    run: |
+      set -euo pipefail
+      PATCH_FILE="${{ github.action_path }}/patches/bypass.patch"
+      if [ -f "$PATCH_FILE" ]; then
+        patch -d "${{ github.workspace }}/AnyKernel3" -p1 < "$PATCH_FILE"
+      fi
+