pr-build.yaml 2.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081
  1. name: "PR Build"
  2. run-name: "PR Build ${{ inputs.DEPLOY_TARGET }} triggered by ${{ github.EVENT_NAME }} (@${{ github.ACTOR }})"
  3. on:
  4. workflow_dispatch:
  5. pull_request:
  6. types: [opened, reopened]
  7. jobs:
  8. build-for-pr:
  9. runs-on: ubuntu-latest
  10. env:
  11. REPO_SELF: ${{ vars.REPO_SELF }}
  12. APP_PATH: "applications_user/subbrute"
  13. RELATIVE_PATH: "applications/external/subbrute"
  14. PREV_TAG: ""
  15. APP_NAME: ""
  16. ZIP_NAME: ""
  17. ZIP_TAG: ""
  18. TGZ_NAME: ""
  19. TGZ_TAG: ""
  20. SHA: ""
  21. FW_VERSION: ""
  22. RELEASE_VERSION: ""
  23. strategy:
  24. fail-fast: false
  25. matrix:
  26. firmware: [unlshd, official]
  27. include:
  28. - firmware: unlshd
  29. url: ${{ vars.REPO_UNLEASHED }}
  30. - firmware: official
  31. url: ${{ vars.REPO_OFFICIAL }}
  32. steps:
  33. - name: Copy Firmware Files
  34. uses: actions/checkout@v4
  35. with:
  36. repository: ${{ matrix.url }}
  37. clean: true
  38. submodules: true
  39. ref: dev
  40. - name: Copy Repo Files
  41. uses: actions/checkout@v4
  42. with:
  43. repository: ${{ vars.REPO_SELF }}
  44. clean: true
  45. submodules: true
  46. path: ${{ env.APP_PATH }}
  47. - name: Remove other apps
  48. shell: pwsh
  49. if: ${{ success() }}
  50. # rm to remove problem FAP which includes non-existent files
  51. run: |
  52. Remove-Item -Force -Recurse ./applications/debug -ErrorAction SilentlyContinue
  53. Remove-Item -Force -Recurse ./applications/examples -ErrorAction SilentlyContinue
  54. Remove-Item -Force -Recurse ${{ env.RELATIVE_PATH }} -ErrorAction SilentlyContinue
  55. - name: Build Firmware
  56. shell: bash
  57. if: ${{ success() }}
  58. env:
  59. FBT_NO_SYNC: 0
  60. DIST_SUFFIX: ${{ matrix.firmware }}
  61. WORKFLOW_BRANCH_OR_TAG: release-cfw
  62. run: |
  63. ./fbt COMPACT=1 DEBUG=0 FBT_NO_SYNC=0
  64. - name: Build FAPs
  65. shell: bash
  66. if: ${{ success() }}
  67. env:
  68. FBT_NO_SYNC: 0
  69. DIST_SUFFIX: ${{ matrix.firmware }}
  70. WORKFLOW_BRANCH_OR_TAG: release-cfw
  71. # rm to remove problem FAP which includes non-existent files
  72. run: |
  73. ./fbt COMPACT=1 DEBUG=0 FBT_NO_SYNC=0 fap_dist
  74. #EOF