feat(ci): make shadow jobs report aggregate success
This commit is contained in:
parent
14b17d2dc9
commit
a634e22d7f
1 changed files with 11 additions and 8 deletions
19
.github/workflows/shadow_job.yml
vendored
19
.github/workflows/shadow_job.yml
vendored
|
@ -52,18 +52,21 @@ jobs:
|
|||
arguments: check
|
||||
gradle-home-cache-cleanup: true
|
||||
|
||||
results:
|
||||
if: ${{ always() }}
|
||||
runs-on: ubuntu-latest
|
||||
name: Final Results
|
||||
needs: [shadow-job]
|
||||
steps:
|
||||
- name: Report failure to healthchecks.io
|
||||
if: ${{ failure() }}
|
||||
# see https://stackoverflow.com/a/67532120/4907315
|
||||
if: ${{ contains(needs.*.result, 'failure') || contains(needs.*.result, 'cancelled') }}
|
||||
run: curl --retry 3 "https://hc-ping.com/${HC_PING_SLUG}/fail"
|
||||
env:
|
||||
HC_PING_SLUG: ${{ secrets.HC_PING_SLUG }}
|
||||
AGP_VERSION: ${{ matrix.agp-version }}
|
||||
run: |
|
||||
curl --retry 3 --data-raw "AGP: ${AGP_VERSION}" "https://hc-ping.com/${HC_PING_SLUG}/fail"
|
||||
|
||||
- name: Report success to healthchecks.io
|
||||
if: ${{ success() }}
|
||||
if: ${{ contains(needs.*.result, 'success') }}
|
||||
env:
|
||||
HC_PING_SLUG: ${{ secrets.HC_PING_SLUG }}
|
||||
AGP_VERSION: ${{ matrix.agp-version }}
|
||||
run: |
|
||||
curl --retry 3 --data-raw "AGP: ${AGP_VERSION}" "https://hc-ping.com/${HC_PING_SLUG}"
|
||||
run: curl --retry 3 "https://hc-ping.com/${HC_PING_SLUG}"
|
||||
|
|
Loading…
Reference in a new issue