From 7a79ead7816b3f64fe37c84b7f97581c6bdec8d6 Mon Sep 17 00:00:00 2001 From: Derek Roberts Date: Tue, 3 Sep 2024 20:19:21 -0400 Subject: [PATCH] fix(ci): merge on failure (#2074) --- .github/workflows/analysis.yml | 4 +++- .github/workflows/pr-open.yml | 4 +++- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/.github/workflows/analysis.yml b/.github/workflows/analysis.yml index 9f910928b..108c8fae8 100644 --- a/.github/workflows/analysis.yml +++ b/.github/workflows/analysis.yml @@ -83,7 +83,9 @@ jobs: results: name: Analysis Results needs: [tests, trivy] + if: always() runs-on: ubuntu-22.04 steps: + - if: contains(needs.*.result, 'failure') + run: echo "At least one job has failed." && exit 1 - run: echo "Success!" - diff --git a/.github/workflows/pr-open.yml b/.github/workflows/pr-open.yml index 00cfa9dde..3d72ca19b 100644 --- a/.github/workflows/pr-open.yml +++ b/.github/workflows/pr-open.yml @@ -50,7 +50,9 @@ jobs: results: name: PR Results needs: [builds, deploys, tests] - if: always() && (!failure()) && (!cancelled()) + if: always() runs-on: ubuntu-22.04 steps: + - if: contains(needs.*.result, 'failure') + run: echo "At least one job has failed." && exit 1 - run: echo "Success!"