소스 검색

Small fixes to log message analysis workflow.

- Fix analysis of logs with firmware build date before 10th of month (leading space issue)
- Make the keyword more specific to avoid false triggers when watchdog is mentioned.
Petteri Aimonen 2 년 전
부모
커밋
82b6cc9953
2개의 변경된 파일5개의 추가작업 그리고 5개의 파일을 삭제
  1. 4 4
      .github/workflows/analyze_crashlogs.yml
  2. 1 1
      utils/analyze_crashlog.sh

+ 4 - 4
.github/workflows/analyze_crashlogs.yml

@@ -12,11 +12,11 @@ jobs:
     runs-on: ubuntu-20.04
     if: |
       (github.event_name == 'issue_comment' && (
-        contains(github.event.comment.body, 'CRASH') ||
-        contains(github.event.comment.body, 'WATCHDOG'))) ||
+        contains(github.event.comment.body, 'CRASH!') ||
+        contains(github.event.comment.body, 'WATCHDOG TIMEOUT'))) ||
       (github.event_name == 'issues' && (
-          contains(github.event.issue.body, 'CRASH') ||
-          contains(github.event.issue.body, 'WATCHDOG')))
+          contains(github.event.issue.body, 'CRASH!') ||
+          contains(github.event.issue.body, 'WATCHDOG TIMEOUT')))
     permissions:
       issues: write
 

+ 1 - 1
utils/analyze_crashlog.sh

@@ -19,7 +19,7 @@ fi
 repo="ZuluSCSI/ZuluSCSI-firmware"
 
 # Find firmware compilation time
-fwtime=$(grep 'FW Version' $logfile | tail -n 1 | egrep -o '[A-Z][a-z][a-z] [0-9]+ [0-9]+ [0-9:]+')
+fwtime=$(grep 'FW Version' $logfile | tail -n 1 | egrep -o '[A-Z][a-z][a-z]\s+[0-9]+\s+[0-9]+\s+[0-9:]+')
 
 # Check if the firmware file is available locally
 echo "Searching for firmware compiled at $fwtime"