You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Tried code with multiple outputs and it seems to negate both when I do it. 2 places where I call writeOutput hoping to set outputs and I get errors. See below.
Changed function to: func writeOutput(name string, output string) error {...}
"Error! {\"statusCode\":200,\"statusMessage\":\"OK\",\"ok\":false,\"result\":\"{\\\"ok\\\":false,\\\"error\\\":\\\"invalid_blocks\\\",\\\"errors\\\":[\\\"failed to match all allowed schemas [json-pointer:/blocks/2/text]\\\",\\\"must be more than 0 characters [json-pointer:/blocks/2/text/text]\\\"],\\\"response_metadata\\\":{\\\"messages\\\":[\\\"[ERROR] failed to match all allowed schemas [json-pointer:/blocks/2/text]\\\",\\\"[ERROR] must be more than 0 characters [json-pointer:/blocks/2/text/text]\\\"]}}\",\"response\":{\"ok\":false,\"error\":\"invalid_blocks\",\"errors\":[\"failed to match all allowed schemas [json-pointer:/blocks/2/text]\",\"must be more than 0 characters [json-pointer:/blocks/2/text/text]\"],\"response_metadata\":{\"messages\":[\"[ERROR] failed to match all allowed schemas [json-pointer:/blocks/2/text]\",\"[ERROR] must be more than 0 characters [json-pointer:/blocks/2/text/text]\"]}}} (response)"Show less
--
build-and-push-to-gcrUnable to process file command 'output' successfully.
build-and-push-to-gcrInvalid value. EOF marker missing new line.
"Error! {\"statusCode\":200,\"statusMessage\":\"OK\",\"ok\":false,\"result\":\"{\\\"ok\\\":false,\\\"error\\\":\\\"invalid_blocks\\\",\\\"errors\\\":[\\\"failed to match all allowed schemas [json-pointer:/blocks/2/text]\\\",\\\"must be more than 0 characters [json-pointer:/blocks/2/text/text]\\\"],\\\"response_metadata\\\":{\\\"messages\\\":[\\\"[ERROR] failed to match all allowed schemas [json-pointer:/blocks/2/text]\\\",\\\"[ERROR] must be more than 0 characters [json-pointer:/blocks/2/text/text]\\\"]}}\",\"response\":{\"ok\":false,\"error\":\"invalid_blocks\",\"errors\":[\"failed to match all allowed schemas [json-pointer:/blocks/2/text]\",\"must be more than 0 characters [json-pointer:/blocks/2/text/text]\"],\"response_metadata\":{\"messages\":[\"[ERROR] failed to match all allowed schemas [json-pointer:/blocks/2/text]\",\"[ERROR] must be more than 0 characters [json-pointer:/blocks/2/text/text]\"]}}} (response)"
[build-and-push-to-gcr](https://github.com/ncr-bsp/docker-java/actions/runs/6513226036/job/17692415054#step:7:28)
Unable to process file command 'output' successfully.
[build-and-push-to-gcr](https://github.com/ncr-bsp/docker-java/actions/runs/6513226036/job/17692415054#step:7:29)
Invalid value. EOF marker missing new line.
can you help?
The text was updated successfully, but these errors were encountered:
I'm not sure I understand the problem you're trying to solve in the first place.
I can suggest a few things that might help you:
Run this step multiple times with different inputs. The overhead of this will be small.
Make the template to look like a JSON string, then split it in a different step using jq.
Use a template with some separator (like ---) and then split it using csplit or awk.
If you still want to do it in a single step, writeOutput function signature may look like this to accept a map of outputs:
funcwriteOutput(outputsmap[string]string) error
Then, for each key in the map, call formatOutput with the key and value and join the strings with a newline separator before writing to the file.
Alternative solution is to use list of outputs, depending on how you want to generate them, and generate output names automatically (result, result2, result3, ...):
funcwriteOutput(outputs []string) error
Also, update action.yml; otherwise some linters will complain about unknown outputs.
First off, this is really good stuff here.
Tried code with multiple outputs and it seems to negate both when I do it. 2 places where I call
writeOutput
hoping to set outputs and I get errors. See below.Changed function to:
func writeOutput(name string, output string) error {...}
can you help?
The text was updated successfully, but these errors were encountered: