From 34494c5b8f5c4b63fc3f5457e2135c6e73384265 Mon Sep 17 00:00:00 2001 From: Derek Roberts Date: Tue, 3 Dec 2024 14:06:40 -0800 Subject: [PATCH] ci: catch canceled jobs --- .github/workflows/analysis.yml | 2 +- .github/workflows/pr-open.yml | 2 +- .github/workflows/pr-validate.yml | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/analysis.yml b/.github/workflows/analysis.yml index 4b5019772..cf81b6a8e 100644 --- a/.github/workflows/analysis.yml +++ b/.github/workflows/analysis.yml @@ -53,6 +53,6 @@ jobs: needs: [tests-java, tests-frontend] # Restore trivy when/if fixed runs-on: ubuntu-24.04 steps: - - if: contains(needs.*.result, 'failure') + - if: contains(needs.*.result, 'canceled|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 f7ed4772f..8f3ffa476 100644 --- a/.github/workflows/pr-open.yml +++ b/.github/workflows/pr-open.yml @@ -583,6 +583,6 @@ jobs: if: always() runs-on: ubuntu-24.04 steps: - - if: contains(needs.*.result, 'failure') + - if: contains(needs.*.result, 'canceled|failure') run: echo "At least one job has failed." && exit 1 - run: echo "Success!" diff --git a/.github/workflows/pr-validate.yml b/.github/workflows/pr-validate.yml index 9d3759c7d..fc2fc5da4 100644 --- a/.github/workflows/pr-validate.yml +++ b/.github/workflows/pr-validate.yml @@ -76,6 +76,6 @@ jobs: if: always() runs-on: ubuntu-24.04 steps: - - if: contains(needs.*.result, 'failure') + - if: contains(needs.*.result, 'canceled|failure') run: echo "At least one job has failed." && exit 1 - run: echo "Success!"