-
Problem when building an action with docker, i want to set some outputs of my action but i can’t find some document about how to set output of an action inside a container. By just send some message to stderr/stdout ? Is there some format of output that i should follow? Please give some help! Thank you! |
Beta Was this translation helpful? Give feedback.
Replies: 3 comments 2 replies
-
Hi @jonyhy96 , Thank you for being here! You can refer to the doc here to check the docker action example for the output setting.
Hope it helps! |
Beta Was this translation helpful? Give feedback.
-
Thanks for help! I already know that we can use I wanna to know what if i don’t use entrypoint.sh but use a binary(written in golang) to handle the input. How can i set the output of the action by the binary? By execute a shell command(::set-output name=<output name>::<value>) inside my binary? What is the principle of ::set-output ? |
Beta Was this translation helpful? Give feedback.
-
> By execute a shell command(::set-output name=<output name>::<value>) inside my binary? No, that’s not a shell command - that’s the parameter to
> By just send some message to stderr/stdout ? Yes, send these commands to stdout. > Is there some format of output that i should follow? Yes, they’re documented here: https://help.github.com/en/actions/reference/workflow-commands-for-github-actions |
Beta Was this translation helpful? Give feedback.
> By execute a shell command(::set-output name=<output name>::<value>) inside my binary?
No, that’s not a shell command - that’s the parameter to
echo
. By printing that string to stdout, the GitHub Actions runner will store that name/value pair in the output context for that step. eg, in Go:> By just send some message to stderr/stdout ?
Yes, send these commands to stdout.
> Is there some format of output that i should follow?
Yes, they’re documented here: https://help.github.com/en/actions/reference/workflow-commands-for-github-actions