From 233024910acad93bc894634c486b6226819e7ffc Mon Sep 17 00:00:00 2001 From: Oleg Nechiporenko Date: Fri, 15 Mar 2024 16:13:04 +0200 Subject: [PATCH] Mark CI jobs as required --- .github/workflows/ci.yml | 28 ++++++++++++++++++++++++++++ 1 file changed, 28 insertions(+) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 55049af..073f789 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -77,3 +77,31 @@ jobs: run: yarn install --frozen-lockfile - name: Run Tests run: ./node_modules/.bin/ember try:one ${{ matrix.try-scenario }} + + validate-success: + needs: + ["try-scenarios"] + runs-on: ubuntu-latest + outputs: + success: ${{ steps.set-output.outputs.success }} + steps: + - id: set-output + run: echo "success=true" >> $GITHUB_OUTPUT + + notify-success: + name: CI pipeline succeeded + needs: ["validate-success"] + if: always() # Always run, so we never skip this required check + runs-on: ubuntu-latest + steps: + - name: Note Pipeline Passed + run: | + msgPrefix="Pipeline #${{ github.run_id }} finished" + passed="${{ needs.validate-success.outputs.success }}" + if [[ "$passed" == "true" ]]; then + echo "${msgPrefix}, PR passed all tests." + exit 0 + else + echo "${msgPrefix}, but with failures. Check left sidebar summary to see which jobs failed." + exit 1 + fi