action.yml 836 B

1234567891011121314151617181920212223242526272829
  1. name: Add bbg
  2. description: add and enable bbg into the kernel
  3. runs:
  4. using: composite
  5. steps:
  6. - name: add bbg into kernel
  7. shell: bash
  8. run: |
  9. cd "$COMMON"
  10. echo "Adding BBG..."
  11. curl -LSs https://github.com/vc-teahouse/Baseband-guard/raw/main/setup.sh | bash
  12. - name: enable bbg in defconfig
  13. shell: bash
  14. run: |
  15. "$COMMON/scripts/config" --file "$GKI_DEFCONFIG" --enable CONFIG_BBG
  16. - name: add bbg into kconfig
  17. shell: bash
  18. run: |
  19. cd "$COMMON"
  20. sed -i '/^config LSM$/,/^help$/{ /^[[:space:]]*default/ { /baseband_guard/! s/selinux/selinux,baseband_guard/ } }' security/Kconfig
  21. - name: if config_lsm is in defconfig, add bbg
  22. shell: bash
  23. run: |
  24. cd "$GITHUB_WORKSPACE"
  25. sed -i '/^CONFIG_LSM=/ s/"$/,baseband_guard"/' "$GKI_DEFCONFIG"