Closed aroller closed 4 years ago
This looks like a bug with how empty payloads are being handled and I've reproduced the bug on my end. Working on a fix now!
@aroller Could you verify that the fix is working for you? It's available at the bugfix/empty-json-payloads
branch which you can point your workflow to. Once I know it's working for you as intended I'll merge the changes.
I tested the fix with various valid and invalid (as well as missing) JSON string payloads and think it should be behaving the way you want it to now.
Here's an example workflow step (note the uses
property):
- name: Emit repository_dispatch
uses: mvasigh/dispatch-action@bugfix/empty-json-payloads
with:
token: ${{ secrets.PERSONAL_ACCESS_TOKEN }}
repo: "@"
event_type: sample_push
debug: 1
message: |
{
"foo": "bar",
"multiline": "
Testing a multiline JSON string
",
"baz": 123456,
"bool": true
}
Closed this and released v1.1.5 which should fix it; if you continue to have this problem please open another issue. Thanks!
I followed the example given and I am getting this JSON error. I tried also with v1.1.4 and adding payload and debugging:
See the Actions in action. Your insight into the problem is appreciated.