From aa9aad0d33e4278ecb659b4e79b00500d06a708a Mon Sep 17 00:00:00 2001 From: traxys Date: Fri, 10 May 2024 10:08:34 +0200 Subject: [PATCH] Add a final result step --- .github/workflows/build.yml | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 64f5d96..99179c0 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -40,3 +40,16 @@ jobs: authToken: '${{ secrets.CACHIX_AUTH_TOKEN }}' - run: NIXPKGS_ALLOW_UNFREE=1 nix build --impure '.#${{ matrix.package }}' - run: nix build .#checks.x86_64-linux.launch + + # This allows us to have a branch protection with matrix + build-status: + runs-on: ubuntu-latest + needs: [build] + if: always() + steps: + - name: Successful build + if: ${{ !(contains(needs.*.result, 'failure')) }} + run: exit 0 + - name: Failing build + if: ${{ contains(needs.*.result, 'failure') }} + run: exit 1