From b8e91e035e6eed43539bcd4002193faede994ebf Mon Sep 17 00:00:00 2001 From: Jeremy Adams Date: Wed, 30 Oct 2024 21:33:23 -0700 Subject: [PATCH] ansi-2-html Signed-off-by: Jeremy Adams --- action.yml | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/action.yml b/action.yml index 40c3931..3de3a77 100644 --- a/action.yml +++ b/action.yml @@ -90,11 +90,14 @@ runs: # Send stdout to GITHUB_OUTPUT (echo -n "stdout=" && cat "${tmpout}") >> "$GITHUB_OUTPUT" + # Set up ANSI to HTML converter + sudo npm install -g ansi-to-html + # Append formatted stdout to GITHUB_STEP_SUMMARY { echo "### Dagger stdout" echo "" - echo "
"
+          echo -n "
"
           cat "${tmpout}"
           echo "
" echo "" @@ -104,8 +107,8 @@ runs: { echo "### Dagger stderr" echo "" - echo "
"
-          cat "${tmperr}"
+          echo -n "
"
+          ansi-to-html < "${tmperr}"
           echo "
" echo "" } >> $GITHUB_STEP_SUMMARY