Help
cancel
Showing results for 
Search instead for 
Did you mean: 
Highlighted
Copilot Lvl 3
Message 1 of 3

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

Solved! Go to Solution.
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?
2 Replies
Solution
Community Manager
Message 2 of 3

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

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?


Best,
AndreaG

Mark helpful posts with Accept as Solution to help other users locate important info. Don't forget to give Kudos for great content!

Copilot Lvl 3
Message 3 of 3

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

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