Просмотр исходного кода

ci(configure-kernel): simplify conditional sed command

The condition is now handled by the GitHub Actions step's `if` directive, removing the need for an inline bash conditional. This makes the workflow step cleaner and more idiomatic.
TheWildJames 6 месяцев назад
Родитель
Сommit
251b4fcbca
1 измененных файлов с 3 добавлено и 4 удалено
  1. 3 4
      .github/actions/configure-kernel/action.yml

+ 3 - 4
.github/actions/configure-kernel/action.yml

@@ -48,10 +48,9 @@ runs:
         CONFIG_IP_SET_LIST_SET=y
         EOF
 
-    - name: Apply Kernel Configuration
+    - name: Apply Kernel Config for 5.10
       shell: bash
       working-directory: ${{ github.workspace }}/kernel/common
+      if: inputs.kernel_version == '5.10'
       run: |
-        if [[ "${{ inputs.kernel_version }}" == "5.10" ]]; then
-          sed -i 's/CONFIG_IP_SET_MAX/65534/g' net/netfilter/ipset/ip_set_core.c
-        fi
+        sed -i 's/CONFIG_IP_SET_MAX/65534/g' net/netfilter/ipset/ip_set_core.c