action.yml 1.5 KB

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