From 03d824cd2ca713a67fa904dc29d5e90647ca2c8c Mon Sep 17 00:00:00 2001
From: Marcelo Shima <marceloshima@gmail.com>
Date: Wed, 21 Feb 2024 22:26:37 -0300
Subject: [PATCH] add iOS summary for ci auto-merge requirement

---
 .github/workflows/ios.yml | 18 +++++++++++++++++-
 1 file changed, 17 insertions(+), 1 deletion(-)

diff --git a/.github/workflows/ios.yml b/.github/workflows/ios.yml
index b19b7d322..33fb984d1 100644
--- a/.github/workflows/ios.yml
+++ b/.github/workflows/ios.yml
@@ -24,7 +24,7 @@ concurrency:
   # Cancel intermediate pull request builds
   cancel-in-progress: ${{ startsWith(github.ref, 'refs/pull/') }}
 jobs:
-  generate:
+  applications:
     name: e2e-${{ matrix.app_type }}-${{ matrix.jhipster_version }}
     runs-on: macos-13
     if: "!contains(github.event.head_commit.message, '[ci skip]') && !contains(github.event.head_commit.message, '[skip ci]') && !contains(github.event.pull_request.title, '[skip ci]') && !contains(github.event.pull_request.title, '[ci skip]') && !contains(github.event.ref_type, '[tag]')"
@@ -116,3 +116,19 @@ jobs:
             ${{ runner.workspace }}/${{ matrix.app_type }}/**/*
             !${{ runner.workspace }}/${{ matrix.app_type }}/node_modules
             !${{ runner.workspace }}/${{ matrix.app_type }}/e2e/Exponent.app
+  ios-result:
+    permissions:
+      contents: none
+    runs-on: ubuntu-latest
+    needs: [applications]
+    if: always()
+    steps:
+      - run: |
+          echo '${{ toJSON(needs) }}'
+          if ([ 'skipped' == '${{ needs.applications.result }}' ] || [ 'success' == '${{ needs.applications.result }}' ]); then
+            exit 0
+          fi
+          if [ 'closed' == '${{ github.event.action }}' ]; then
+            exit 0
+          fi
+          exit 1