Skip to content

Conversation

KevinCarterDev
Copy link

The GitHub documentation for Deployments says that the payload can be "object or string". When setting the payload to an object this Action fails with

Error: Unable to process file command 'output' successfully.
Error: Invalid format '  "namespace": "default"'

This is due to the output being placed across multiple lines

+ jq -r .deployment.payload /github/workflow/event.json
+ echo 'payload={
  "namespace": "default"
}'

By adding the tostring function the error is fixed.

+ jq -r '.deployment.payload|tostring' /github/workflow/event.json
+ echo 'payload={"namespace":"default"}'

@billputer
Copy link
Contributor

@rsotnychenko Any chance of merging this PR? It's necessary for our workflow.

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants