action.yml 1.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142
  1. name: 'Apply Kernel Branding & Timestamp'
  2. description: 'Apply Wild kernel branding to kernel version string'
  3. inputs:
  4. variant:
  5. description: 'Variant of kernel to apply branding to'
  6. required: true
  7. kernel_version:
  8. description: 'Kernel version (e.g., 6.1)'
  9. required: true
  10. android_version:
  11. description: 'Android version (e.g., android14)'
  12. required: true
  13. version:
  14. description: 'Combined version (e.g., android14-6.1)'
  15. required: true
  16. sublevel:
  17. description: 'Sublevel of kernel version (e.g., 1)'
  18. required: true
  19. runs:
  20. using: "composite"
  21. steps:
  22. - name: Apply Kernel Name Branding
  23. shell: bash
  24. working-directory: ${{ github.workspace }}/kernel/common
  25. run: |
  26. CONFIG_FRAGMENT="${{ github.workspace }}/wild_gki.fragment"
  27. touch "$CONFIG_FRAGMENT"
  28. DEFCONFIG="${{ github.workspace }}/kernel/common/arch/arm64/configs/gki_defconfig"
  29. VERSION="${{ inputs.version }}"
  30. ANDROID_PART=$(echo "$VERSION" | cut -d- -f1)
  31. KERNEL_PART=$(echo "$VERSION" | cut -d- -f2)
  32. if [[ ${{ inputs.version }} == "android15-6.6" || ${{ inputs.version }} == "android16-6.12" ]]; then
  33. KERNEL_STRING="$KERNEL_PART.${{ inputs.sublevel }}-$ANDROID_PART"
  34. sed -i '$d' scripts/setlocalversion && echo "echo \"$KERNEL_STRING-Wild\"" >> scripts/setlocalversion
  35. else
  36. sed -i '$d' scripts/setlocalversion && echo "echo \"-$ANDROID_PART-Wild\"" >> scripts/setlocalversion
  37. fi
  38. chmod +x scripts/setlocalversion