action.yml 1.3 KB

12345678910111213141516171819202122232425262728293031323334353637
  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. VERSION="${{ inputs.version }}"
  27. ANDROID_PART=$(echo "$VERSION" | cut -d- -f1)
  28. KERNEL_PART=$(echo "$VERSION" | cut -d- -f2)
  29. if [[ ${{ inputs.version }} == "android15-6.6" || ${{ inputs.version }} == "android16-6.12" ]]; then
  30. KERNEL_STRING="$KERNEL_PART.${{ inputs.sublevel }}-$ANDROID_PART"
  31. sed -i '$d' scripts/setlocalversion && echo "echo \"$KERNEL_STRING-Wild\"" >> scripts/setlocalversion
  32. else
  33. sed -i '$d' scripts/setlocalversion && echo "echo \"-$ANDROID_PART-Wild\"" >> scripts/setlocalversion
  34. fi
  35. chmod +x scripts/setlocalversion