post-api-call/README.md

33 lines
566 B
Markdown
Raw Normal View History

2021-05-22 06:17:43 +08:00
# webhook-action
2021-05-22 05:53:33 +08:00
2021-05-22 06:17:43 +08:00
GitHub Action that sends a POST request of any kind.
2021-05-22 05:53:33 +08:00
2021-05-22 06:17:43 +08:00
## Inputs
2021-05-22 05:53:33 +08:00
2021-05-22 06:17:43 +08:00
### `url`
2021-05-22 05:53:33 +08:00
2021-05-22 06:17:43 +08:00
**Required**: URL to send post request to.
2021-05-22 05:53:33 +08:00
2021-05-22 06:17:43 +08:00
### `data`
2021-05-22 05:53:33 +08:00
2021-05-22 06:17:43 +08:00
Optional: JSON string of data to pass into request. Default `"{}"`.
2021-05-22 05:53:33 +08:00
2021-05-22 06:17:43 +08:00
### `headers`
2021-05-22 05:53:33 +08:00
2021-05-22 06:17:43 +08:00
Optional: JSON string of headers to pass into request. Default `"{}"`.
2021-05-22 05:53:33 +08:00
2021-05-22 06:17:43 +08:00
## Example usage
2021-05-22 05:53:33 +08:00
```yaml
2021-05-22 06:17:43 +08:00
uses: dkershner6/post-api-call-action@v1.0.0
2021-05-22 05:53:33 +08:00
with:
2021-05-22 06:17:43 +08:00
url: ${{ secrets.API_URL }}
data: "{'command': 'publish'}"
headers: "{'Authorization': '${{ secrets.API_KEY }}'}"
2021-05-22 05:53:33 +08:00
```
2021-05-22 06:17:43 +08:00
## Contributing
2021-05-22 05:53:33 +08:00
2021-05-22 06:17:43 +08:00
Feel free to open issues or submit PRs.