From a0e59669c51d70826a70cfc6bbdce0565d4d869d Mon Sep 17 00:00:00 2001
From: chahat sagar <109112505+chahatsagarmain@users.noreply.github.com>
Date: Mon, 6 Jan 2025 14:22:35 +0530
Subject: [PATCH] Update action.yaml

Signed-off-by: chahat sagar <109112505+chahatsagarmain@users.noreply.github.com>
---
 .github/actions/verify-metrics-snapshot/action.yaml | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)

diff --git a/.github/actions/verify-metrics-snapshot/action.yaml b/.github/actions/verify-metrics-snapshot/action.yaml
index 3a8dbc085de4..d030424d4b47 100644
--- a/.github/actions/verify-metrics-snapshot/action.yaml
+++ b/.github/actions/verify-metrics-snapshot/action.yaml
@@ -66,7 +66,11 @@ runs:
       run: |
         python3 -m pip install prometheus-client
         python3 ./scripts/e2e/compare_metrics.py --file1 ./.metrics/${{ inputs.snapshot }} --file2 ./.metrics/cached_${{ inputs.snapshot}} --output ./.metrics/diff_${{ inputs.snapshot }}
-
+        if [ $? -eq 0 ]; then
+        echo "No differences found in metrics"
+        exit 1
+        fi
+        
     - name: Upload the diff artifact
       if: ${{ (steps.cache-metrics.outputs.cache-hit == 'true') && (steps.diff-check.outcome == 'failure') }}
       uses: actions/upload-artifact@6f51ac03b9356f520e9adb1b1b7802705f340c2b # v4.5.0