From 7668f9dcb2480a38ca05ee706931f1e08cc93b0a Mon Sep 17 00:00:00 2001 From: Petar Kirov Date: Thu, 25 Jan 2024 04:01:57 +0200 Subject: [PATCH] ci(gh-actions): Define "results" job that depends on the result of the whole matrix --- .github/workflows/ci.yml | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 396b8f45..074df82d 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -54,3 +54,16 @@ jobs: - name: Build ${{ matrix.package }} run: nix build -L --json --no-link '.#${{ matrix.attrPath }}' + + results: + if: ${{ always() }} + runs-on: ubuntu-latest + name: Final Results + needs: [build] + steps: + - run: exit 1 + if: >- + ${{ + contains(needs.*.result, 'failure') + || contains(needs.*.result, 'cancelled') + }}