Skip to content

Commit 6d8d7f9

Browse files
committed
Add transpiled JS to job summary if changed
1 parent 50935f5 commit 6d8d7f9

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

.github/workflows/script/check-js.sh

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,13 @@ if [ ! -z "$(git status --porcelain)" ]; then
1616
# If we get a fail here then the PR needs attention
1717
>&2 echo "Failed: JavaScript files are not up to date. Run 'rm -rf lib && npm run-script build' to update"
1818
git status
19+
20+
echo "### Transpiled JS diff" >> $GITHUB_STEP_SUMMARY
21+
echo "" >> $GITHUB_STEP_SUMMARY
22+
echo '```diff' >> $GITHUB_STEP_SUMMARY
23+
git diff --output="$RUNNER_TEMP/js.diff"
24+
cat "$RUNNER_TEMP/js.diff" >> $GITHUB_STEP_SUMMARY
25+
echo '```' >> $GITHUB_STEP_SUMMARY
1926
exit 1
2027
fi
2128
echo "Success: JavaScript files are up to date"

0 commit comments

Comments
 (0)