From f038081e1367b227083f99b1789d2a7be773d5df Mon Sep 17 00:00:00 2001 From: DaneEvans Date: Sat, 12 Jul 2025 12:54:07 +1000 Subject: [PATCH] single check (#2422) --- .github/workflows/merge-queue.yml | 33 ++++++++++++++++++++++++------ .github/workflows/pull-request.yml | 21 +++++++++++++++++++ 2 files changed, 48 insertions(+), 6 deletions(-) diff --git a/.github/workflows/merge-queue.yml b/.github/workflows/merge-queue.yml index a63834957..19940da09 100644 --- a/.github/workflows/merge-queue.yml +++ b/.github/workflows/merge-queue.yml @@ -10,12 +10,12 @@ concurrency: jobs: # New job to satisfy the required check for the merge queue - scheduled_updates: - if: github.repository == 'meshtastic/Meshtastic-Android' # Keep consistent with other jobs - runs-on: ubuntu-latest - steps: - - name: Always pass merge queue scheduled_updates check - run: echo "This check is primarily for PR entry; passing in merge queue." + # scheduled_updates: + # if: github.repository == 'meshtastic/Meshtastic-Android' # Keep consistent with other jobs + # runs-on: ubuntu-latest + # steps: + # - name: Always pass merge queue scheduled_updates check + # run: echo "This check is primarily for PR entry; passing in merge queue." build_and_detekt: if: github.repository == 'meshtastic/Meshtastic-Android' @@ -33,3 +33,24 @@ jobs: upload_artifacts: false secrets: GRADLE_ENCRYPTION_KEY: ${{ secrets.GRADLE_ENCRYPTION_KEY }} + + check-workflow-status: + name: Check Workflow Status + runs-on: ubuntu-latest + needs: + [ + build_and_detekt, + androidTest + ] + if: always() + steps: + - name: Check Workflow Status + run: | + exit_on_result() { + if [[ "$2" == "failure" || "$2" == "cancelled" ]]; then + echo "Job '$1' failed or was cancelled." + exit 1 + fi + } + exit_on_result "build_and_detekt" "${{ needs.build_and_detekt.result }}" + exit_on_result "androidTest" "${{ needs.androidTest.result }}" diff --git a/.github/workflows/pull-request.yml b/.github/workflows/pull-request.yml index 535c3995f..d45b6ebf2 100644 --- a/.github/workflows/pull-request.yml +++ b/.github/workflows/pull-request.yml @@ -39,3 +39,24 @@ jobs: # upload_artifacts defaults to true, so no need to explicitly set secrets: GRADLE_ENCRYPTION_KEY: ${{ secrets.GRADLE_ENCRYPTION_KEY }} + + check-workflow-status: + name: Check Workflow Status + runs-on: ubuntu-latest + needs: + [ + build_and_detekt, + androidTest + ] + if: always() + steps: + - name: Check Workflow Status + run: | + exit_on_result() { + if [[ "$2" == "failure" || "$2" == "cancelled" ]]; then + echo "Job '$1' failed or was cancelled." + exit 1 + fi + } + exit_on_result "build_and_detekt" "${{ needs.build_and_detekt.result }}" + exit_on_result "androidTest" "${{ needs.androidTest.result }}" \ No newline at end of file