How can I force action to execute using "repository_dispatch" event?

Hey I have a problem with triggering my actions based on custom dispatch.

My workflow configuration ( main.yml ):

on:
  repository_dispatch: {}
  push:
    branches:
    - testing-gh-actions

I am trying to dispatch custom action with:

curl --verbose -X POST -u "adasq:MY_TOKEN" \
-H "Accept: application/vnd.github.everest-preview+json" \
-H "Content-Type: application/json" \
https://api.github.com/repos/adasq/dropbox-v2-api/dispatches \
--data '{"event_type": "html.preview"}'

Do you see any problems here?

Hi @adasq,

Thanks for reaching out and apologies for the delay in getting you some help. Are you receiving a webhook or other error message?

Code posted above is valid. I thought my action configuration will work on custom branch. Merging with master resolved my problem. Cheers

1 Like