fix: also use env vars in Write job summary step
The Write job summary step had the same issue - backticks in the agent output were being interpreted as bash command substitution, causing 'syntax error near unexpected token' failures. Use environment variables and printf instead of echo to safely handle all special characters in the output. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
parent
22041c5aae
commit
8969f42261
1 changed files with 9 additions and 4 deletions
13
.github/workflows/continue-agents.yml
vendored
13
.github/workflows/continue-agents.yml
vendored
|
|
@ -117,22 +117,27 @@ jobs:
|
|||
|
||||
- name: Write job summary
|
||||
if: always()
|
||||
env:
|
||||
AGENT_OUTPUT: ${{ steps.run.outputs.output }}
|
||||
AGENT_ERROR: ${{ steps.run.outputs.error }}
|
||||
AGENT_SUCCESS: ${{ steps.run.outputs.success }}
|
||||
AGENT_NAME: ${{ steps.agent-name.outputs.name }}
|
||||
run: |
|
||||
echo "## 🤖 Agent: ${{ steps.agent-name.outputs.name }}" >> $GITHUB_STEP_SUMMARY
|
||||
echo "## 🤖 Agent: $AGENT_NAME" >> $GITHUB_STEP_SUMMARY
|
||||
echo "" >> $GITHUB_STEP_SUMMARY
|
||||
if [ "${{ steps.run.outputs.success }}" == "true" ]; then
|
||||
if [ "$AGENT_SUCCESS" == "true" ]; then
|
||||
echo "✅ **Status:** Completed successfully" >> $GITHUB_STEP_SUMMARY
|
||||
echo "" >> $GITHUB_STEP_SUMMARY
|
||||
echo "### Output" >> $GITHUB_STEP_SUMMARY
|
||||
echo '```' >> $GITHUB_STEP_SUMMARY
|
||||
echo "${{ steps.run.outputs.output }}" >> $GITHUB_STEP_SUMMARY
|
||||
printf '%s\n' "$AGENT_OUTPUT" >> $GITHUB_STEP_SUMMARY
|
||||
echo '```' >> $GITHUB_STEP_SUMMARY
|
||||
else
|
||||
echo "❌ **Status:** Failed" >> $GITHUB_STEP_SUMMARY
|
||||
echo "" >> $GITHUB_STEP_SUMMARY
|
||||
echo "### Error" >> $GITHUB_STEP_SUMMARY
|
||||
echo '```' >> $GITHUB_STEP_SUMMARY
|
||||
echo "${{ steps.run.outputs.error }}" >> $GITHUB_STEP_SUMMARY
|
||||
printf '%s\n' "$AGENT_ERROR" >> $GITHUB_STEP_SUMMARY
|
||||
echo '```' >> $GITHUB_STEP_SUMMARY
|
||||
fi
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue