Skip to content

How to set output of the action inside a docker container? #25154

Answered by ethomson
jonyhy96 asked this question in Actions
Discussion options

You must be logged in to vote

> 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:

import("fmt")

fmt.Println("::set-output name=output_name::value")

> 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

Replies: 3 comments 2 replies

Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
2 replies
@marlinhares
Comment options

@rr-jino-jose
Comment options

Answer selected
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
5 participants