diff --git a/ci-support.sh b/ci-support.sh index 53f9ca36d8d722bca3c33f5213d1deab0f91337c..a4007f442ae9d477c2f1ac39b0dd8457bc1e1de6 100644 --- a/ci-support.sh +++ b/ci-support.sh @@ -56,21 +56,24 @@ if [[ "$GITLAB_CI" = "true" ]] && [[ "$CI_DISPOSABLE_ENVIRONMENT" = "true" ]]; fi +GROUP_NEST_LEVEL=0 begin_output_group() { - if [[ $GITHUB_ACTIONS == "true" ]]; then + if [[ $GITHUB_ACTIONS == "true" ]] && [[ $GROUP_NEST_LEVEL == 0 ]]; then echo "::group::$1" else echo "--------------------------------------------------------------" echo "BEGIN $1" echo "--------------------------------------------------------------" fi + GROUP_NEST_LEVEL=$((GROUP_NEST_LEVEL + 1)) } end_output_group() { - if [[ $GITHUB_ACTIONS == "true" ]]; then + GROUP_NEST_LEVEL=$((GROUP_NEST_LEVEL - 1)) + if [[ $GITHUB_ACTIONS == "true" ]] && [[ $GROUP_NEST_LEVEL == 0 ]]; then echo "::endgroup::$1" else echo "--------------------------------------------------------------"