A GitHub action to make a POST call to any API
Go to file
github-actions 69e9f655c4 chore(deps): upgrade dependencies
Upgrades project dependencies. See details in [workflow run].

[Workflow Run]: https://github.com/dkershner6/post-api-call-action/actions/runs/9769697469

------

*Automatically created by projen via the "upgrade-main" workflow*

Signed-off-by: github-actions <github-actions@github.com>
2024-07-03 00:15:05 +00:00
.github chore(deps): upgrade dependencies 2024-07-03 00:15:05 +00:00
.projen chore(deps): upgrade dependencies 2024-07-03 00:15:05 +00:00
dist chore: self mutation 2024-01-07 00:17:58 +00:00
docs chore: self mutation 2024-01-07 00:16:53 +00:00
src chore: self mutation 2024-01-07 00:16:53 +00:00
.eslintrc.json chore(deps): upgrade dependencies 2024-07-03 00:15:05 +00:00
.gitattributes chore(deps): upgrade dependencies 2024-07-03 00:15:05 +00:00
.gitignore chore(deps): upgrade dependencies 2024-07-03 00:15:05 +00:00
.npmignore chore(deps): upgrade dependencies 2024-07-03 00:15:05 +00:00
.npmrc feat: Node 20, projen 2023-12-30 19:18:19 -08:00
.prettierignore feat: Node 20, projen 2023-12-30 19:18:19 -08:00
.prettierrc.json feat: Node 20, projen 2023-12-30 19:18:19 -08:00
.projenrc.ts chore: self mutation 2024-01-07 00:16:53 +00:00
action.yml feat: Node 20, projen 2023-12-30 19:18:19 -08:00
LICENSE chore: project created with projen 2023-12-30 19:05:12 -08:00
package.json chore(deps): upgrade dependencies 2024-07-03 00:15:05 +00:00
pnpm-lock.yaml chore(deps): upgrade dependencies 2024-07-03 00:15:05 +00:00
README.md feat: Node 20, projen 2023-12-30 19:18:19 -08:00
tsconfig.json chore(deps): upgrade dependencies 2024-07-03 00:15:05 +00:00
tsconfig.publish.json chore(deps): upgrade dependencies 2024-01-07 00:15:49 +00:00

webhook-action

GitHub Action that sends a POST request of any kind. This is a thin wrapper around Axios.post.

Inputs

url

Required: URL to send post request to.

data

Optional: JSON string of data to pass into request. Default "{}".

headers

Optional: JSON string of headers to pass into request. Default "{}".

params

Optional: JSON string of query parameters to pass into request. Default "{}".

Example usage

uses: dkershner6/post-api-call-action@v2
with:
  url: ${{ secrets.API_URL }}
  data: "{\"command\": \"publish\"}"
  headers: "{\"Authorization\": \"Bearer ${{ secrets.API_KEY }}\"}"
  params: "{\"content\": \"Test Content\"}"

Contributing

All contributions are welcome, please open an issue or pull request.

To use this repository:

  1. npm i -g pnpm (if don't have pnpm installed)
  2. pnpm i
  3. npx projen (this will ensure everything is setup correctly, and you can run this command at any time)
  4. Good to make your changes!
  5. You can run npx projen build at any time to build the project.