Hi,
I am trying to set a custom payload for my build hook with GitHub actions.
...
steps:
- name: Curl request
run: curl -X POST -d {} <MY_BUILD_HOOK_URL>
I don’t know what the payload has to look like to be able to get used in my Netlify function (process.env.INCOMING_HOOK_BODY).
The idea is the following:
I’ve set up the following build command = "node ./updatescript.js && hugo --gc --minify"
which calls a script to update some stuff before building my site with hugo.
I’ve also setup a schedule task to trigger the build once a day using a GitHub action.
To only execute some parts of the script if the build is triggered by the GitHub action and NOT by a manual push/update of the repo I want to pass a custom payload and use the environment variable INCOMING_HOOK_BODY in my script for conditionals like:
if (process.env.INCOMING_HOOK_BODY)
Can I use the -d {}
? How?
Thanks.