From c3a122523326c3002524f86ae5186592467958d1 Mon Sep 17 00:00:00 2001 From: Ralf Jung Date: Tue, 6 Oct 2020 11:11:14 +0200 Subject: [PATCH] add bors notification jobs --- .github/workflows/ci.yml | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 101618d1a7a..0e7d6e1cd61 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -33,3 +33,25 @@ jobs: host_target: i686-pc-windows-msvc steps: - uses: actions/checkout@v2 + + # These jobs doesn't actually test anything, but they're only used to tell + # bors the build completed, as there is no practical way to detect when a + # workflow is successful listening to webhooks only. + # + # ALL THE PREVIOUS JOBS NEED TO BE ADDED TO THE `needs` SECTION OF THIS JOB! + end-success: + name: bors build finished + runs-on: ubuntu-latest + needs: [build] + if: github.event.pusher.name == 'bors' && success() + steps: + - name: mark the job as a success + run: exit 0 + end-failure: + name: bors build finished + runs-on: ubuntu-latest + needs: [build] + if: github.event.pusher.name == 'bors' && (failure() || cancelled()) + steps: + - name: mark the job as a failure + run: exit 1