From 4b4a349e5a8d3fd7fc1923ee50b60ae5a4a1dc7c Mon Sep 17 00:00:00 2001 From: Siddharth Venkatesan Date: Mon, 5 Feb 2024 10:14:42 -0800 Subject: [PATCH] [fix][ci] avoid early exit of script for failure case --- .github/workflows/publish-job-success.yml | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/.github/workflows/publish-job-success.yml b/.github/workflows/publish-job-success.yml index 09548a342c4..ec75dd63595 100644 --- a/.github/workflows/publish-job-success.yml +++ b/.github/workflows/publish-job-success.yml @@ -30,8 +30,7 @@ jobs: run: | workflow_name=$(echo "$WORKFLOW_NAME" | tr -d ' ') metric_name="${REPO_NAME}-${workflow_name}-Failure" - [[ "$CONCLUSION" == "success" ]] - failedBuild=$? + failedBuild=$([ "$CONCLUSION" == "success" ]; echo $?) aws cloudwatch put-metric-data --namespace GithubCI \ --metric-name "$metric_name" \ --value $failedBuild \