Skip to content

Commit

Permalink
Log more things, add tmate and env vars
Browse files Browse the repository at this point in the history
  • Loading branch information
plocket committed May 23, 2024
1 parent 9d09e18 commit 56ce214
Showing 1 changed file with 15 additions and 2 deletions.
17 changes: 15 additions & 2 deletions action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -166,19 +166,25 @@ runs:
UNEXPECTED_RESULTS_PATH="${ARTIFACT_NAME}/unexpected_results.txt"
DEBUG_LOG_PATH="${ARTIFACT_NAME}/debug_log.txt"
echo "${ARTIFACT_NAME}/report.txt" >> $GITHUB_ENV
echo "${ARTIFACT_NAME}/unexpected_results.txt" >> $GITHUB_ENV
echo "${ARTIFACT_NAME}/debug_log.txt" >> $GITHUB_ENV
echo "$UNEXPECTED_RESULTS_PATH"
# Get contents of files if they exist
if [ -f "$REPORT_PATH" ]; then
REPORT=$(cat "$REPORT_PATH")
else
REPORT="report.txt does not exist"
fi
if [ -f "$UNEXPECTED_RESULTS_PATH" ]; then
UNEXPECTED_RESULTS_PATH=$(cat "$UNEXPECTED_RESULTS_PATH")
UNEXPECTED_RESULTS=$(cat "$UNEXPECTED_RESULTS_PATH")
else
UNEXPECTED_RESULTS_PATH="unexpected_results.txt does not exist"
fi
if [ -f "$DEBUG_LOG_PATH" ]; then
DEBUG_LOG_PATH=$(cat "$DEBUG_LOG_PATH")
DEBUG_LOG=$(cat "$DEBUG_LOG_PATH")
else
DEBUG_LOG_PATH="debug_log.txt does not exist"
fi
Expand All @@ -189,6 +195,13 @@ runs:
echo "DEBUG_LOG=$DEBUG_LOG" >> "$GITHUB_OUTPUT"
echo "unexpected_results:\n$UNEXPECTED_RESULTS"
echo "REPORT=$REPORT" >> $GITHUB_ENV
echo "UNEXPECTED_RESULTS=$UNEXPECTED_RESULTS" >> $GITHUB_ENV
echo "DEBUG_LOG=$DEBUG_LOG" >> $GITHUB_ENV
- name: Setup tmate session
uses: mxschmitt/action-tmate@v3

- shell: bash
if: ${{ always() }}
run: |
Expand Down

0 comments on commit 56ce214

Please sign in to comment.