Skip to content

Commit

Permalink
Add status to outputs (#147)
Browse files Browse the repository at this point in the history
* Add status to outputs

* add response.status info to readme

* build new version
  • Loading branch information
oj-unito authored May 4, 2024
1 parent ed8a1c3 commit 7d4a18a
Show file tree
Hide file tree
Showing 3 changed files with 558 additions and 555 deletions.
2 changes: 2 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,7 @@ jobs:
|---|---|
`response` | Response as JSON String
`headers` | Headers
`status` | HTTP status message

To display HTTP response data in the GitHub Actions log give the request an `id` and access its `outputs`. You can also access specific field from the response data using [fromJson()](https://docs.github.com/en/actions/learn-github-actions/expressions#fromjson) expression.

Expand All @@ -70,6 +71,7 @@ steps:
run: |
echo ${{ steps.myRequest.outputs.response }}
echo ${{ steps.myRequest.outputs.headers }}
echo ${{ steps.myRequest.outputs.status }}
echo ${{ fromJson(steps.myRequest.outputs.response).field_you_want_to_access }}
```

Expand Down
Loading

0 comments on commit 7d4a18a

Please sign in to comment.