mirror of
https://github.com/th30d4y/OpenLearnX.git
synced 2026-05-26 11:25:49 +00:00
Add stronger log write and payload error handling
Agent-Logs-Url: https://github.com/th30d4y/OpenLearnX/sessions/17fba2c8-4f49-4a78-9dc4-483acc8cc945 Co-authored-by: Stalin-143 <161853795+Stalin-143@users.noreply.github.com>
This commit is contained in:
committed by
GitHub
parent
fdc4d67e48
commit
c31b857c11
@@ -60,7 +60,7 @@ jobs:
|
|||||||
LOG_FILE="$LOG_DIR/events.jsonl"
|
LOG_FILE="$LOG_DIR/events.jsonl"
|
||||||
|
|
||||||
if [ ! -r "$GITHUB_EVENT_PATH" ]; then
|
if [ ! -r "$GITHUB_EVENT_PATH" ]; then
|
||||||
echo "GitHub event payload file is missing or unreadable: $GITHUB_EVENT_PATH"
|
echo "GitHub event payload file is missing or unreadable: $GITHUB_EVENT_PATH. Check workflow run environment details."
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
|
|
||||||
@@ -92,6 +92,11 @@ jobs:
|
|||||||
payload: $payload[0]
|
payload: $payload[0]
|
||||||
}' >> "$LOG_FILE"
|
}' >> "$LOG_FILE"
|
||||||
|
|
||||||
|
if [ ! -s "$LOG_FILE" ]; then
|
||||||
|
echo "Log write failed: $LOG_FILE was not created with content."
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
|
||||||
- name: Commit and push logs
|
- name: Commit and push logs
|
||||||
run: |
|
run: |
|
||||||
set -euo pipefail
|
set -euo pipefail
|
||||||
|
|||||||
Reference in New Issue
Block a user