Adding grouping in GitHub Actions output.

Signed-off-by: Tim 'mithro' Ansell <tansell@google.com>
This commit is contained in:
Tim 'mithro' Ansell 2021-12-14 13:17:36 -08:00
parent c7309c692f
commit 0a0addedd7
2 changed files with 18 additions and 8 deletions

View File

@ -13,10 +13,11 @@ PYTHONHASHSEED=0
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 @@ fi
# 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 @@ fi
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 @@ for SETTINGS in $(ls $TMPDIR/prjxray/settings/*.sh | grep '7.sh$'); do
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 @@ for SETTINGS in $(ls $TMPDIR/prjxray/settings/*.sh | grep '7.sh$'); do
echo "--------------------------------------------"
done
fi
echo "::endgroup::"
done
@ -119,9 +122,10 @@ python3 -m markdown \
# 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
)

View File

@ -25,7 +25,7 @@ TMPDIR=$(mktemp -d)
# 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 @@ TMPDIR=$(mktemp -d)
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 @@ TMPDIR=$(mktemp -d)
git add --all .
)
echo "--------------------------------------------"
echo "::endgroup::"
(
cd html
echo
echo "Committing"
echo "::group::Committing"
echo "--------------------------------------------"
git status
echo "--------------------------------------------"
@ -69,11 +71,15 @@ TMPDIR=$(mktemp -d)
-m "" \
-m "$CURRENT_MESSAGE"
fi
echo "--------------------------------------------"
echo "::endgroup::"
echo
echo "Pushing"
echo "::group::Pushing"
echo "--------------------------------------------"
git push origin
echo "--------------------------------------------"
echo "::endgroup::"
)
)