Skip to content

Commit

Permalink
Update readme, cleanup unused code.
Browse files Browse the repository at this point in the history
  • Loading branch information
navied committed Oct 28, 2020
1 parent d229718 commit bb89b24
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 50 deletions.
24 changes: 0 additions & 24 deletions Dockerfile

This file was deleted.

33 changes: 11 additions & 22 deletions README.md
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.
4 changes: 0 additions & 4 deletions entrypoint.sh

This file was deleted.

0 comments on commit bb89b24

Please sign in to comment.