From 168734b2e00ba3ded74eb68dd5971006211df74b Mon Sep 17 00:00:00 2001 From: "Shao Yu-Lung (Allen)" Date: Fri, 21 Feb 2025 09:42:32 +0800 Subject: [PATCH] check matrix jobs --- .github/workflows/dockerimage.yml | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/.github/workflows/dockerimage.yml b/.github/workflows/dockerimage.yml index 074e8ea..c7ca3f5 100644 --- a/.github/workflows/dockerimage.yml +++ b/.github/workflows/dockerimage.yml @@ -55,3 +55,15 @@ jobs: platforms: linux/arm64 push: ${{ (github.event_name != 'pull_request') && (github.repository == 'laradock/php-fpm') && (github.ref == 'refs/heads/master') }} tags: ${{ steps.meta.outputs.tags }} + + final_check: + runs-on: ubuntu-latest + needs: build + if: always() + steps: + - name: Fail if any matrix job failed + run: | + if [ "${{ needs.build.result }}" == "failure" ]; then + echo "Some matrix jobs failed, marking workflow as failed." + exit 1 + fi