ICU-21542 Have GHA output ICU4J test failures if there are any.
diff --git a/.ci-builds/.azure-pipelines.yml b/.ci-builds/.azure-pipelines.yml
index e9411cb..4256e62 100644
--- a/.ci-builds/.azure-pipelines.yml
+++ b/.ci-builds/.azure-pipelines.yml
@@ -17,8 +17,9 @@
       displayName: 'Build and Test'
       env:
         BUILD: ICU4J
+    # exit with a non-zero status in order to make this step show as a red X in the UI.
     - script: |
-        [ -d icu4j/out/junit-results ] && cd icu4j && cat `find out/junit-results -name "*.txt" -exec grep -l FAILED {} \;`
+        [ -d icu4j/out/junit-results ] && cd icu4j && cat `find out/junit-results -name "*.txt" -exec grep -l FAILED {} \;` && exit 1
       condition: failed() # only run if the build fails.
       displayName: 'List failures (if any)'
 #-------------------------------------------------------------------------
diff --git a/.github/workflows/icu_ci.yml b/.github/workflows/icu_ci.yml
index e178fcf..3c5515a 100644
--- a/.github/workflows/icu_ci.yml
+++ b/.github/workflows/icu_ci.yml
@@ -48,6 +48,10 @@
           cd icu4j;
           ant init;
           ant check;
+      - name: List failures (if any)
+        run: |
+          [ -d icu4j/out/junit-results ] && cd icu4j && cat `find out/junit-results -name "*.txt" -exec grep -l FAILED {} \;`;
+        if: ${{ failure() }}
 
   # gcc debug build.
   # Includes dependency checker.