name: "PR Build" run-name: "PR Build ${{ inputs.DEPLOY_TARGET }} triggered by ${{ github.EVENT_NAME }} (@${{ github.ACTOR }})" on: workflow_dispatch: pull_request: types: [opened, reopened] jobs: build-for-pr: runs-on: ubuntu-latest env: REPO_SELF: ${{ vars.REPO_SELF }} APP_PATH: "applications_user/subbrute" RELATIVE_PATH: "applications/external/subbrute" PREV_TAG: "" APP_NAME: "" ZIP_NAME: "" ZIP_TAG: "" TGZ_NAME: "" TGZ_TAG: "" SHA: "" FW_VERSION: "" RELEASE_VERSION: "" strategy: fail-fast: false matrix: firmware: [unlshd, official] include: - firmware: unlshd url: ${{ vars.REPO_UNLEASHED }} - firmware: official url: ${{ vars.REPO_OFFICIAL }} steps: - name: Copy Firmware Files uses: actions/checkout@v4 with: repository: ${{ matrix.url }} clean: true submodules: true ref: dev - name: Copy Repo Files uses: actions/checkout@v4 with: repository: ${{ vars.REPO_SELF }} clean: true submodules: true path: ${{ env.APP_PATH }} - name: Remove other apps shell: pwsh if: ${{ success() }} # rm to remove problem FAP which includes non-existent files run: | Remove-Item -Force -Recurse ./applications/debug -ErrorAction SilentlyContinue Remove-Item -Force -Recurse ./applications/examples -ErrorAction SilentlyContinue Remove-Item -Force -Recurse ${{ env.RELATIVE_PATH }} -ErrorAction SilentlyContinue - name: Build Firmware shell: bash if: ${{ success() }} env: FBT_NO_SYNC: 0 DIST_SUFFIX: ${{ matrix.firmware }} WORKFLOW_BRANCH_OR_TAG: release-cfw run: | ./fbt COMPACT=1 DEBUG=0 FBT_NO_SYNC=0 - name: Build FAPs shell: bash if: ${{ success() }} env: FBT_NO_SYNC: 0 DIST_SUFFIX: ${{ matrix.firmware }} WORKFLOW_BRANCH_OR_TAG: release-cfw # rm to remove problem FAP which includes non-existent files run: | ./fbt COMPACT=1 DEBUG=0 FBT_NO_SYNC=0 fap_dist #EOF