mirror of
https://github.com/joelwmale/webhook-action.git
synced 2026-06-12 02:36:00 -05:00
[GH-ISSUE #10] Protecting webhook #715
Reference in New Issue
Block a user
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @wakebit on GitHub (May 23, 2020).
Original GitHub issue: https://github.com/joelwmale/webhook-action/issues/10
I use this package (https://github.com/adnanh/webhook) as webhook for server. It allows to protect webhook like this:
where RANDOM-SECRET-STRING is secret key that can be used in Github Webhooks. Is there feature for adding this header and secret key on this action?
@beshur commented on GitHub (May 26, 2020):
You can just hide the secret in the repo secrets and use in the action as
${{ secrets.RANDOM_SECRET_STRING }}See https://help.github.com/en/actions/configuring-and-managing-workflows/creating-and-storing-encrypted-secrets
@wakebit commented on GitHub (May 26, 2020):
@beshur, I know about Github Secrets. You dont understand my question.
I ask how to add header to this action like it does Github Webhooks when calling hook:
X-Hub-Signature: RANDOM-SECRET-STRINGAs I understand, this action does not support headers. Maybe @joelwmale will add this feature.
@beshur commented on GitHub (May 26, 2020):
I see, sorry.
Actually, this action only does
curlon yourWEBHOOK_URLwith{data: $data}, so you can as easily do it yourself, until the custom headers are supported.@joelwmale commented on GitHub (Aug 26, 2020):
Custom headers are now supported as of v2.0.0. You could use these to add your signature with a custom string to protect your API.