Recently github has announced change that echo "::set-output name=x::y"
command is deprecated and should be replaced by echo "x=y" >> $GITHUB_OUTPUT
The previous command was able to process multilined value of b
while the new approach fails with the folllowing errors
Error: Unable to process file command 'output' successfully.
Error: Invalid format
In my script, I populate a variable message
with a message text that should be sent to slack. I need output variables to pass that text to the next job step which performs the send operation.
message="Coverage: $(cat coverage.txt). Covered: $(cat covered.txt). Uncovered: $(cat uncovered.txt). Coverage required: $(cat coverageRequires.csv)"
The last part of message includes context of a csv
file which has multiple lines
While the set-output
command was able to process such multilined parameters
echo "::set-output name=text::$message"
the new version fails
echo "text=$message" >> $GITHUB_OUTPUT
What can be done to fix or avoid this error?
Outputs are Unicode strings, and can be a maximum of 1 MB. The total of all outputs in a workflow run can be a maximum of 50 MB.
--- Defining outputs for jobs - GitHub Docs.