Adding grouping in GitHub Actions output. Signed-off-by: Tim 'mithro' Ansell <tansell@google.com>
diff --git a/.github/scripts/generate-html.sh b/.github/scripts/generate-html.sh index 4aa9859..da57f44 100755 --- a/.github/scripts/generate-html.sh +++ b/.github/scripts/generate-html.sh
@@ -13,10 +13,11 @@ PRJXRAY_INFO_REVISION=$(grep "prjxray/commit" Info.md | sed -e's-.*/prjxray/commit/--' -e's/\([0-9a-fA-F]*\).*$/\1/') echo -echo "Project X-Ray Database Revision $(git describe --long --tags --always)" +echo "::group::Project X-Ray Database Revision $(git describe --long --tags --always)" echo "--------------------------------------------" git log -1 echo "--------------------------------------------" +echo "::endgroup::" echo # Remove any pre-existing html output. @@ -55,7 +56,7 @@ # Reset to the right revision git reset --hard $PRJXRAY_INFO_REVISION echo - echo "Project X-Ray Revision $(git describe --long --tags --always)" + echo "::group::Project X-Ray Revision $(git describe --long --tags --always)" echo "--------------------------------------------" echo "Info says version should be $(git describe --long --tags --always $PRJXRAY_INFO_REVISION) ($PRJXRAY_INFO_REVISION)" echo "--------------------------------------------" @@ -66,6 +67,7 @@ echo rm -rf database ln -s $DBDIR database + echo "::endgroup::" ) # Generate the HTML for each device we have a settings file for. @@ -75,7 +77,7 @@ export PYTHONPATH=$PYTHONPATH:$TMPDIR/prjxray echo - echo "Generating for $DEVICE" + echo "::group::Generating for $DEVICE" echo "--------------------------------------------" echo "settings.sh $(sha256sum $SETTINGS)" cat $SETTINGS @@ -103,6 +105,7 @@ echo "--------------------------------------------" done fi + echo "::endgroup::" done @@ -119,9 +122,10 @@ # Output a summary of the generated stuff ( echo - echo "HTML Results" + echo "::group::HTML Results" echo "--------------------------------------------" sha256sum $(find html -type f | sort) echo "--------------------------------------------" + echo "::endgroup::" echo )
diff --git a/.github/scripts/push-html.sh b/.github/scripts/push-html.sh index ea1849b..3781732 100755 --- a/.github/scripts/push-html.sh +++ b/.github/scripts/push-html.sh
@@ -25,7 +25,7 @@ # Clone the destination echo - echo "Cloning GitHub pages" + echo "::group::Cloning GitHub pages" echo "--------------------------------------------" ssh-add -l ssh -v github.com || true @@ -37,9 +37,10 @@ find -type f | grep -v .git | sort ) echo "--------------------------------------------" + echo "::endgroup::" echo - echo "Updating html" + echo "::group::Updating html" echo "--------------------------------------------" rm -rf html/* cp -a $SRCDIR/html/* html/ @@ -48,11 +49,12 @@ git add --all . ) echo "--------------------------------------------" + echo "::endgroup::" ( cd html echo - echo "Committing" + echo "::group::Committing" echo "--------------------------------------------" git status echo "--------------------------------------------" @@ -69,11 +71,15 @@ -m "" \ -m "$CURRENT_MESSAGE" fi + echo "--------------------------------------------" + echo "::endgroup::" + echo - echo "Pushing" + echo "::group::Pushing" echo "--------------------------------------------" git push origin echo "--------------------------------------------" + echo "::endgroup::" ) )