forked from koraykoska/secure-actions-webhook
-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
3 changed files
with
11 additions
and
50 deletions.
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,35 +1,24 @@ | ||
# Secure-Webhook | ||
|
||
Securely call CD servers / notification services after your Action finishes | ||
|
||
## Credit | ||
|
||
Thanks goes to https://github.com/koraykoska/secure-actions-webhook | ||
Securely call Webhook endpoint after your Action finishes | ||
|
||
## Usage | ||
|
||
Sending a string: | ||
Sending a json string, ``url``, and ``hmacSecret`` are required fields, and ``data`` is optional. | ||
|
||
```yaml | ||
- name: Webhook | ||
uses: navied/secure-actions-webhook@0.1.3 | ||
env: | ||
REQUEST_URI: ${{ secrets.REQUEST_URI }} | ||
REQUEST_DATA: "something_interesting" | ||
HMAC_SECRET: ${{ secrets.HMAC_SECRET }} | ||
uses: navied/secure-actions-webhook@0.2.0 | ||
with: | ||
url: https://example.com | ||
data: '{ "example": "data" }' | ||
hmacSecret: ${{ secrets.HMAC_SECRET }} | ||
``` | ||
Sending a json string: | ||
The request will include the header `X-Hub-Signature`, which is the hmac signature of the raw body just like in Github webhooks, and also the header `X-Hub-SHA` which is the SHA of the commit running the github action. | ||
|
||
```yaml | ||
- name: Webhook | ||
uses: navied/secure-actions-webhook@0.1.3 | ||
env: | ||
REQUEST_URI: ${{ secrets.REQUEST_URI }} | ||
REQUEST_DATA: '{ "something": "interesting" }' | ||
HMAC_SECRET: "secret_used_to_generate_signature" | ||
``` | ||
Verify it on your endpoint for integrity. | ||
|
||
The request will include the header `X-Hub-Signature`, which is the hmac signature of the raw body just like in Github webhooks. | ||
## Credit | ||
|
||
Verify it on your endpoint for integrity. | ||
Thanks to https://github.com/koraykoska/secure-actions-webhook for providing the base signature generation code. |
This file was deleted.
Oops, something went wrong.