Jelajahi Sumber

Update LTO storage logic in build workflow

Modify LTO environment variable storage based on kernel version.
jimsterino98 2 minggu lalu
induk
melakukan
f38d98f98e
1 mengubah file dengan 8 tambahan dan 3 penghapusan
  1. 8 3
      .github/workflows/build.yml

+ 8 - 3
.github/workflows/build.yml

@@ -72,11 +72,16 @@ jobs:
       - name: Store branch as env variable
         run: BRANCH=${{ inputs.branch }} && echo "BRANCH=$BRANCH" >> $GITHUB_ENV
 
-      - name: Store LTO as env variable
-        run: BUILD_LTO=${{ inputs.lto }} && echo "BUILD_LTO=$BUILD_LTO" >> $GITHUB_ENV
-
       - name: get kernel version before cloning
         uses: ./.github/actions/kernel-info
+
+      - name: Store LTO as env variable
+        run: |
+         if [[ $KERNEL_VER != 6.6 ]]; then
+          BUILD_LTO=${{ inputs.lto }} && echo "BUILD_LTO=$BUILD_LTO" >> $GITHUB_ENV
+         else
+          BUILD_LTO="default" && echo "BUILD_LTO=$BUILD_LTO" >> $GITHUB_ENV
+         fi
         
       - name: Free Disk Space
         if: true