Browse Source

check action

nameczz 3 years ago
parent
commit
3eb1faaf93
2 changed files with 6 additions and 2 deletions
  1. 2 0
      .github/workflows/check.yml
  2. 4 2
      checkInsight.js

+ 2 - 0
.github/workflows/check.yml

@@ -75,6 +75,8 @@ jobs:
           node-version: 12
           node-version: 12
 
 
       - name: Check insight status
       - name: Check insight status
+        env:
+          INSIGHT_URL: ${{ secrets.INSIGHT_URL }}
         run: |
         run: |
           yarn add axios
           yarn add axios
           node checkInsight.js
           node checkInsight.js

+ 4 - 2
checkInsight.js

@@ -14,7 +14,8 @@ axios
     }
     }
   })
   })
   .then(err => {
   .then(err => {
-    throw new Error(err.message || '---- Server has some error ----');
+    console.log(err.message || '---- Server has some error ----');
+    process.exit();
   });
   });
 
 
 axios
 axios
@@ -28,5 +29,6 @@ axios
     }
     }
   })
   })
   .catch(err => {
   .catch(err => {
-    throw new Error(err.message || '---- Client has some error ----');
+    console.log(err.message || '---- Client has some error ----');
+    process.exit();
   });
   });