action.yml 1.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142
  1. name: Setup Baseband Guard (BBG)
  2. description: Download and configure Baseband Guard security module
  3. runs:
  4. using: composite
  5. steps:
  6. - name: Download Baseband Guard
  7. shell: bash
  8. working-directory: ${{ github.workspace }}/kernel
  9. run: |
  10. cp -R "$GITHUB_WORKSPACE/Baseband-guard" ./
  11. ./Baseband-guard/setup.sh
  12. - name: Configure Baseband Guard
  13. shell: bash
  14. working-directory: ${{ github.workspace }}/kernel
  15. run: |
  16. # Add BBG to defconfig
  17. echo "CONFIG_BBG=y" >> "${{ github.workspace }}/wild_gki.fragment"
  18. # Modify security Kconfig to include baseband_guard in LSM
  19. sed -i '/^config LSM$/,/^help$/{ /^[[:space:]]*default/ { /baseband_guard/! s/selinux/selinux,baseband_guard/ } }' common/security/Kconfig
  20. - name: Verify BBG Installation
  21. shell: bash
  22. working-directory: ${{ github.workspace }}/kernel
  23. run: |
  24. if grep -q "baseband_guard" common/security/Kconfig; then
  25. echo "✓ SUCCESS: baseband_guard found in common/security/Kconfig"
  26. grep -n "baseband_guard" common/security/Kconfig || true
  27. else
  28. echo "✗ FAILED: baseband_guard not found in common/security/Kconfig"
  29. exit 1
  30. fi
  31. - name: Extract BBG Version
  32. shell: bash
  33. working-directory: ${{ github.workspace }}/kernel/Baseband-guard
  34. run: |
  35. # Extract and export BBG version info
  36. BBG_COMMIT=$(git rev-parse --short HEAD 2>/dev/null)
  37. echo "BBG_COMMIT=$BBG_COMMIT" >> $GITHUB_ENV