From a634e22d7f8f3f2935f0f50526222fc9f8c20a0b Mon Sep 17 00:00:00 2001 From: Harsh Shandilya Date: Tue, 28 Feb 2023 11:46:41 +0530 Subject: feat(ci): make shadow jobs report aggregate success --- .github/workflows/shadow_job.yml | 19 +++++++++++-------- 1 file changed, 11 insertions(+), 8 deletions(-) (limited to '.github') diff --git a/.github/workflows/shadow_job.yml b/.github/workflows/shadow_job.yml index 06488732..6f288a14 100644 --- a/.github/workflows/shadow_job.yml +++ b/.github/workflows/shadow_job.yml @@ -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}" -- cgit v1.2.3