Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/cheerz/poll_status
Github action for polling status with timeout
https://github.com/cheerz/poll_status
github-action kda kubernetes
Last synced: about 2 months ago
JSON representation
Github action for polling status with timeout
- Host: GitHub
- URL: https://github.com/cheerz/poll_status
- Owner: cheerz
- License: mit
- Created: 2021-08-20T10:37:22.000Z (over 3 years ago)
- Default Branch: main
- Last Pushed: 2021-08-27T18:57:12.000Z (over 3 years ago)
- Last Synced: 2024-09-17T07:07:32.472Z (4 months ago)
- Topics: github-action, kda, kubernetes
- Language: Shell
- Homepage:
- Size: 4.88 KB
- Stars: 2
- Watchers: 1
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Polling for status with a timeout
This action makes a GET request to a given URL until the status is `complete` or `failed`
Used after launching an action that executes asynchronously and polling for that action's status
Initially created for checking if a kubernetes deployment is complete## Inputs
### `url`
The URL to poll
### `timeout`
Timeout before giving up in seconds
### `interval`
Interval between polling in seconds
## Example usage
```
uses: cheerz/poll_status@v1
with:
url: "https://www.example.com/deployments/1"
timeout: 20
interval: 5
```This script expects a json response from the polling url in the following format:
```
{
status: "complete"/"failed"
}
```Script exit with 1 when status is `failed` and 0 when `complete`
Exit with 1 if timeout reached before receiving `failed` or `complete` as status