single check (#2422)

This commit is contained in:
DaneEvans 2025-07-12 12:54:07 +10:00 committed by GitHub
parent 91cc999523
commit f038081e13
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 48 additions and 6 deletions

View file

@ -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 }}"