Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How can I view github workflow output parameters in github console?

I have setup a reusable workflow which has output values that other steps use. How can I view those output runtime value in github action console? It helps to debug issues when working on a change for those parameters. But I can't find anywhere in github that I can view them.

like image 802
Joey Yi Zhao Avatar asked Oct 20 '25 00:10

Joey Yi Zhao


1 Answers

If you want to see outputs in same step which creates them, just dump GITHUB_OUTPUT file.

- run:   |
         echo "var=value" >> $GITHUB_OUTPUT
         cat $GITHUB_OUTPUT
  shell: bash

If you want to see outputs after step which creates them, you can use toJSON with partial steps context.

- run:   echo "$OUTPUTS"
  shell: bash
  env:
   OUTPUTS: ${{ toJSON(steps.step-name.outputs) }}

If outputs comes from another job, just replace steps.step-name.outputs with needs.job-name.outputs

This solution is actually mentioned in docs nowdays, but example provided shows dumping whole contexts only.

like image 184
Samira Avatar answered Oct 23 '25 20:10

Samira



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!