English 中文(简体)
I am getting an Invalid format for response in Github actions
原标题:

I am trying to run an aws cli command in Github actions to get messages from a queue. I need to use the output from the queue in another job. According to aws cli document for queues aws_receive_message the format of the output is an object that returns a list of messages.

But i keep getting these errors from Github actions:

Error: Unable to process file command  output  successfully.`
Error: Invalid format      "Messages": [ 

Here is a snippet of my code:

- name: Receive Message
  id: receive_message
  run: |
     message=`aws sqs receive-message --queue-url https://sqs.us-east1.amazonaws.com/myqueue.fifo 
     --attribute-names All 
     --message-attribute-names All --max-number-of-messages 10 --output json`
     echo result $message
     echo "message=$message" >> $GITHUB_OUTPUT

- name: Print Message
  id: print_message
  run: echo "${{ fromJson(steps.receive_message.outputs.message) }}"

I am assuming it something to do with the list being returned in the output that is not json formatted, but I am not sure how to resolve this.enter image description here

Is there a way to resolve this error?

问题回答

暂无回答




相关问题
Mount windows shared drive to MWAA in bootscript

In MWAA startup script sudo yum install samba-client cifs-utils -y sudo mount.cifs //dev/test/drop /mnt/dev/test-o username=testuser,password= pwd ,domain=XX Executing above commonds giving error - ...

How to get Amazon Seller Central orders programmatically?

We have been manually been keying Amazon orders into our system and would like to automate it. However, I can t seem to figure out how to go about it. Their documentation is barely there. There is: ...

Using a CDN like Amazon S3 to control access to media

I want to use Amazon S3/CloudFront to store flash files. These files must be private as they will be accessed by members. This will be done by storing each file with a link to Amazon using a mysql ...

unable to connect to database on AWS

actually I have my website build with Joomla hosted on hostmonster but all Joomla website need a database support to run this database is on AWS configuration files need to be updated for that I ...

Using EC2 Load Balancing with Existing Wordpress Blog

I currently have a virtual dedicated server through Media Temple that I use to run several high traffic Wordpress blogs. Both tend to receive sudden StumbleUpon traffic surges that (I m assuming) ...

SSL slowness in EC2

We ve deployed our rails app to EC2. In our setup, we have two proxies on small instances behind round-robin DNS. These run nginx load balancers for a dynamically growing and shrinking farm of web ...

热门标签