Skip to content

Commit

Permalink
add badge
Browse files Browse the repository at this point in the history
  • Loading branch information
Satak committed Dec 4, 2019
1 parent bab215c commit bd53d8a
Show file tree
Hide file tree
Showing 2 changed files with 22 additions and 14 deletions.
6 changes: 4 additions & 2 deletions .github/workflows/main.yml → .github/workflows/test.yml
Original file line number Diff line number Diff line change
@@ -1,8 +1,9 @@
on: [push]
name: Test
env:
MY_NAME: Satak the great
MY_NAME: testUser
jobs:
webhook_job:
webhook_test_job:
runs-on: ubuntu-latest
name: Job to send payload to webhook API
steps:
Expand All @@ -23,3 +24,4 @@ jobs:
run: |
$output = '${{ steps.webhook.outputs.output }}' | ConvertFrom-Json
Write-Host "Time from output $($output.time) statusCode $($output.statusCode)"
$output.statusCode -eq 200
30 changes: 18 additions & 12 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,19 +1,10 @@
# Web Request Action

This action makes a web request to any JSON API. Supports all HTTP methods, JSON payload and basic authentication.
> A GitHub Action to make a web request to any JSON API. Supports all HTTP methods, JSON payload and basic authentication.
## Inputs

| Parameter | Required | Info |
| ---------- | -------- | -------------------------------------------------- |
| `url` | `true` | Web request URL endpoint |
| `method` | `true` | Web request method (`GET`, `POST`, `PUT`, `PATCH`) |
| `payload` | `false` | Web request payload in JSON format |
| `headers` | `false` | Web request headers in JSON format |
| `username` | `false` | Basic auth username |
| `password` | `false` | Basic auth password |
[![Test Status](https://github.com/satak/webrequest-action/workflows/Test/badge.svg)](https://github.com/satak/webrequest-action/actions)

## Example usage
## Usage

```yaml
uses: satak/webrequest-action@master
Expand All @@ -26,6 +17,17 @@ with:
password: ${{ secrets.BASIC_AUTH_PW }}
```
## Inputs
| Parameter | Required | Info |
| ---------- | -------- | -------------------------------------------------- |
| `url` | `true` | Web request URL endpoint |
| `method` | `true` | Web request method (`GET`, `POST`, `PUT`, `PATCH`) |
| `payload` | `false` | Web request payload in JSON format |
| `headers` | `false` | Web request headers in JSON format |
| `username` | `false` | Basic auth username |
| `password` | `false` | Basic auth password |

## Outputs

Output format: `JSON`
Expand All @@ -49,3 +51,7 @@ run: |
$output = '${{ steps.webhook.outputs.output }}' | ConvertFrom-Json
Write-Host "Time from output $($output.time) statusCode $($output.statusCode)"
```

## License

[MIT](LICENSE)

0 comments on commit bd53d8a

Please sign in to comment.