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.
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.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With