Skip to content

Commit fd674da

Browse files
committed
fix: use step output for staleness report in PR body
The PR body was showing literal `$(cat staleness-output.json)` because shell command substitution doesn't execute inside YAML string fields. Capture the report as a multiline step output and reference it with ${{ steps.staleness.outputs.report }} instead.
1 parent 4d5842d commit fd674da

1 file changed

Lines changed: 4 additions & 1 deletion

File tree

‎.github/workflows/docs-staleness.yml‎

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,9 @@ jobs:
3838
python scripts/agents/check-staleness.py --dry-run > staleness-output.json
3939
if [ -s staleness-output.json ] && [ "$(cat staleness-output.json)" != "[]" ]; then
4040
echo "has_stale=true" >> "$GITHUB_OUTPUT"
41+
echo "report<<STALENESS_EOF" >> "$GITHUB_OUTPUT"
42+
cat staleness-output.json >> "$GITHUB_OUTPUT"
43+
echo "STALENESS_EOF" >> "$GITHUB_OUTPUT"
4144
echo "Stale docs found:"
4245
cat staleness-output.json
4346
else
@@ -61,7 +64,7 @@ jobs:
6164
and merge this PR.
6265
6366
```json
64-
$(cat staleness-output.json)
67+
${{ steps.staleness.outputs.report }}
6568
```
6669
branch: agents/staleness-${{ github.run_id }}
6770
labels: agents-staleness

0 commit comments

Comments
 (0)