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:
copilot-swe-agent[bot]
2026-04-19 06:38:00 +00:00
committed by GitHub
parent fdc4d67e48
commit c31b857c11
@@ -60,7 +60,7 @@ jobs:
LOG_FILE="$LOG_DIR/events.jsonl"
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
fi
@@ -92,6 +92,11 @@ jobs:
payload: $payload[0]
}' >> "$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
run: |
set -euo pipefail