mirror of
https://github.com/meshtastic/Meshtastic-Android.git
synced 2026-04-20 22:23:37 +00:00
single check (#2422)
This commit is contained in:
parent
91cc999523
commit
f038081e13
2 changed files with 48 additions and 6 deletions
33
.github/workflows/merge-queue.yml
vendored
33
.github/workflows/merge-queue.yml
vendored
|
|
@ -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 }}"
|
||||
|
|
|
|||
21
.github/workflows/pull-request.yml
vendored
21
.github/workflows/pull-request.yml
vendored
|
|
@ -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 }}"
|
||||
Loading…
Add table
Add a link
Reference in a new issue