Showing results for 
Search instead for 
Did you mean: 
Copilot Lvl 3
Message 1 of 2

Has github action somthing like travis_fold?

Solved! Go to Solution.

Hey :), 

in travis you can use something like a travis_fold to show steps inside the log.


Than there would be a way to build dynamic step text outputs.


Will something like this be supported in the future or is it support?

1 Reply
Pilot Lvl 2
Message 2 of 2

Re: Has github action somthing like travis_fold?

There is ::group "command" which allows to hide boring parts of scripts. Can't remember where i found this; it's not in docs, so either it was used by someone else in their workflow, or inside 'actions/toolkit' repo.



- run: |
       echo Important stuff
       echo ::group::Boring stuff
       echo very
       echo boring
       echo stuff
       echo ::endgroup::
       echo Exciting stuff

will become

Important stuff
▶ Boring stuff
Exciting stuff

when checking workflow run under Actions tab, with "Boring stuff" clickable to expand group.


There are two minor issues with ::group i know of:

- Colorizing warnings/errors breaks ::group 

- Commands writing to error stream might 'escape' grouping (see last answer by thboop)


Not sure if first one is still valid, but second one i still can see in recent runs; easy to avoid.

- run:   |
         echo ::group::Stuff
         ./name 2>&1
         echo ::endgroup::
  shell: bash