action.yml 2.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566
  1. name: set variables
  2. description: set environment variables
  3. inputs:
  4. susfs:
  5. description: 'susfs'
  6. required: true
  7. branch:
  8. description: 'device kernel'
  9. required: true
  10. zeromount:
  11. description: 'zeromount'
  12. required: true
  13. runs:
  14. using: composite
  15. steps:
  16. - name: set dependency directory variables
  17. shell: bash
  18. run: |
  19. ROOT="$GITHUB_WORKSPACE"
  20. if [[ ${{ inputs.susfs }} == 'true' ]]; then
  21. SUSFS4KSU="$ROOT/susfs4ksu"
  22. KERNEL_PATCHES="$ROOT/kernel_patches"
  23. echo "SUSFS4KSU=$SUSFS4KSU" >> $GITHUB_ENV
  24. echo "KERNEL_PATCHES=$KERNEL_PATCHES" >> $GITHUB_ENV
  25. fi
  26. ANYKERNEL3="$ROOT/AnyKernel3"
  27. if [[ ${{ inputs.zeromount }} == 'true' ]]; then
  28. ZEROMOUNT="$ROOT/Super-Builders"
  29. echo "ZEROMOUNT=$ZEROMOUNT" >> $GITHUB_ENV
  30. fi
  31. echo "ROOT=$ROOT" >> $GITHUB_ENV
  32. echo "ANYKERNEL3=$ANYKERNEL3" >> $GITHUB_ENV
  33. - name: set common variable
  34. shell: bash
  35. run: |
  36. if [[ ${{ inputs.branch }} == SM-A546* || "${{ inputs.branch }}" == "SM-M146B-Oneui7-ADYJ2" || "${{ inputs.branch }}" == "SM-S908B-Oneui8-bitK" || "${{ inputs.branch }}" == "SM-X610-Oneui6.1.1-bit7" ]]; then
  37. COMMON="$CONFIG"
  38. elif [[ "${{ inputs.branch }}" == "SM-A566B" || ${{ inputs.branch }} == SM-A055* ]]; then
  39. COMMON="$CONFIG/kernel-6.6"
  40. elif [[ "${{ inputs.branch }}" == "SM-S926B-Oneui8" || ${{ inputs.branch }} == SM-A556* ]]; then
  41. COMMON="$CONFIG/kernel"
  42. else
  43. COMMON="$CONFIG/kernel_platform/common"
  44. fi
  45. echo "COMMON=$COMMON" >> $GITHUB_ENV
  46. - name: set defconfig variable
  47. shell: bash
  48. run: |
  49. if [[ "${{ inputs.branch }}" == "SM-A546B-Oneui7" || "${{ inputs.branch }}" == "SM-A546B-Oneui8" ]]; then
  50. GKI_DEFCONFIG="$COMMON/arch/arm64/configs/s5e8835-a54xnaxx_defconfig"
  51. elif [[ "${{ inputs.branch }}" == "SM-A546E-Oneui7" || "${{ inputs.branch }}" == "SM-A546E-Oneui8" ]]; then
  52. GKI_DEFCONFIG="$COMMON/arch/arm64/configs/s5e8835-a54xnsxx_defconfig"
  53. elif [[ "${{ inputs.branch }}" == "SM-M146B-Oneui7-ADYJ2" ]]; then
  54. GKI_DEFCONFIG="$COMMON/arch/arm64/configs/s5e8535-m14xnsxx_defconfig"
  55. elif [[ "${{ inputs.branch }}" == "SM-S908B-Oneui8-bitK" ]]; then
  56. GKI_DEFCONFIG="$COMMON/arch/arm64/configs/s5e9925-b0sxxx_defconfig"
  57. elif [[ "${{ inputs.branch }}" == "SM-X610-Oneui6.1.1-bit7" ]]; then
  58. GKI_DEFCONFIG="$COMMON/arch/arm64/configs/s5e8835-gts9fepwifixx_defconfig"
  59. else
  60. GKI_DEFCONFIG="$COMMON/arch/arm64/configs/gki_defconfig"
  61. fi
  62. echo "GKI_DEFCONFIG=$GKI_DEFCONFIG" >> $GITHUB_ENV