Closed JakubGniadzik closed 1 year ago
I'm running into the same issue. I'm pretty sure it is because this action triggers a workflow_dispatch not a repository_dispatch which has client_payload as its input.
workflow_dispatch have "inputs" parameter in API request https://docs.github.com/en/rest/actions/workflows#create-a-workflow-dispatch-event and this action is using that parameter, client_paylaod is just a variable, which is used here to provide inputs https://github.com/convictional/trigger-workflow-and-wait/blob/a382075b8ce6e15d85477232d501eb047e21f7aa/entrypoint.sh#L138 So I guess this is not an issue that we are looking for...
Actually when I look on this line now - I think escape characters are missing here for clinet_payload variable, maybe this cause the problem?
@keithconvictional could you take a look on that?
@rabih
According to README I should use JSON syntax in client_payload and this is what I'm using: client_payload: '{"remote_repo": "${{ github.event.repository.name }}"}'
Thank you for the patience @JakubGniadzik! Can you confirm that "remote_repo" exists as an input in whatever workflow you are trying to trigger. I was able to recreate the situation and can confirm that it is working properly for me.
Closing due to inactivity
Hello! I've issue when I try to pass client payload using trigger-workflow-and-wait:
curl: (22) The requested URL returned error: 422 api failed: path: workflows/workflow.yml/dispatches response: { "message": "Unexpected inputs provided: [\"remote_repo\"]", "documentation_url": "https://docs.github.com/rest/reference/actions#create-a-workflow-dispatch-event" }
According to README I should use JSON syntax in client_payload and this is what I'm using: client_payload: '{"remote_repo": "${{ github.event.repository.name }}"}'
Thanks in advance for help!