action.yml 2.2 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859
  1. name: 'Download Kernel Repository'
  2. description: 'Initialize and sync Android kernel source repository'
  3. inputs:
  4. android_version:
  5. description: 'Android version (e.g., android14)'
  6. required: true
  7. kernel_version:
  8. description: 'Kernel version (e.g., 5.15, 6.1)'
  9. required: true
  10. os_patch_level:
  11. description: 'OS patch level (e.g., 2024-01)'
  12. required: true
  13. outputs:
  14. deprecated_branch:
  15. description: 'Whether the branch is deprecated'
  16. value: ${{ steps.sync.outputs.deprecated }}
  17. runs:
  18. using: composite
  19. steps:
  20. # - name: Initialize and Sync Kernel Repository
  21. # id: sync
  22. # shell: bash
  23. # working-directory: ${{ github.workspace }}/kernel
  24. # run: |
  25. # FORMATTED_BRANCH="${{ inputs.android_version }}-${{ inputs.kernel_version }}-${{ inputs.os_patch_level }}"
  26. #
  27. # repo init -u https://android.googlesource.com/kernel/manifest -b common-${FORMATTED_BRANCH} --depth=1 --partial-clone --clone-filter=blob:limit=10M
  28. #
  29. # REMOTE_BRANCH=$(git ls-remote https://android.googlesource.com/kernel/common ${FORMATTED_BRANCH})
  30. # DEFAULT_MANIFEST_PATH=.repo/manifests/default.xml
  31. # DEPRECATED=false
  32. #
  33. # if grep -q deprecated <<< $REMOTE_BRANCH; then
  34. # sed -i "s/\"${FORMATTED_BRANCH}\"/\"deprecated\/${FORMATTED_BRANCH}\"/g" $DEFAULT_MANIFEST_PATH
  35. # echo "⚠ Note: Branch ${FORMATTED_BRANCH} is considered deprecated."
  36. # DEPRECATED=true
  37. # fi
  38. #
  39. # echo "deprecated=$DEPRECATED" >> $GITHUB_OUTPUT
  40. #
  41. # repo sync -c -j$(nproc --all) --fail-fast --no-tags --force-sync --no-clone-bundle
  42. - name: Ensure Kernel Directory
  43. shell: bash
  44. run: |
  45. mkdir -p "${{ github.workspace }}/kernel"
  46. - name: Download Kernel Repository (Manifest Archives)
  47. id: sync
  48. shell: bash
  49. working-directory: ${{ github.workspace }}/kernel
  50. env:
  51. PYTHONUNBUFFERED: "1"
  52. GITHUB_TOKEN: ${{ github.token }}
  53. run: |
  54. python3 "${{ github.action_path }}/download_kernel_archives.py" --android-version "${{ inputs.android_version }}" --kernel-version "${{ inputs.kernel_version }}" --os-patch-level "${{ inputs.os_patch_level }}"