Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Dynamic Github Actions Steps

The following shows what the Github Actions tab displays for a typical build:

output

The Build step actually has a number of sub-steps, but I do not want to use Github Actions as a scripting language just to be able to have each sub-step discreetly displayed. Is there any sort of magic that Github Actions provides to signal that you wish the visualization of the build to show a discrete step (i.e. a "dynamic step")?

I'm hoping for something like the following which would cause the creation of discrete result nodes in the output of the Github Actions build visualization:

- name: Dynamic Steps
  run |
     echo "###github-action-step: Step 1"
     echo "###github-action-step: Step 2"
     echo "###github-action-step: Step 3"

like image 839
Derek Greer Avatar asked Apr 07 '26 11:04

Derek Greer


1 Answers

There is an option to group the logs inside the build step.

jobs:
  bash-example:
    runs-on: ubuntu-latest
    steps:
      - name: Group of log lines
        run: |
            echo "::group::My title"
            echo "Inside group"
            echo "::endgroup::"

Grouping

Documentation: https://docs.github.com/en/actions/using-workflows/workflow-commands-for-github-actions#grouping-log-lines

Pretty late to the party, but hope someone find it useful

like image 53
Mateusz Balbus Avatar answered Apr 10 '26 04:04

Mateusz Balbus



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!