Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Convert object payloads to string #6

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

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