https://github.com/tsrberry/unstable-commands
A GitHub Action to retry commands if weird things happen.
https://github.com/tsrberry/unstable-commands
Last synced: over 1 year ago
JSON representation
A GitHub Action to retry commands if weird things happen.
- Host: GitHub
- URL: https://github.com/tsrberry/unstable-commands
- Owner: TSRBerry
- License: mit
- Created: 2023-07-30T16:40:30.000Z (about 3 years ago)
- Default Branch: main
- Last Pushed: 2024-06-07T07:17:29.000Z (about 2 years ago)
- Last Synced: 2025-03-18T07:43:16.587Z (over 1 year ago)
- Language: TypeScript
- Homepage:
- Size: 620 KB
- Stars: 1
- Watchers: 1
- Forks: 7
- Open Issues: 6
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Unstable commands
A GitHub Action to retry commands if weird things happen.
## Inputs
### `commands`
**Required**:
The commands to run.
Use this like the `run` keyword for [steps](https://docs.github.com/en/actions/using-workflows/workflow-syntax-for-github-actions#jobsjob_idstepsrun).
### `timeout-minutes`
**Required**:
Maximum number of minutes to wait for the commands to finish execution.
Use this like the `timeout-minutes` keyword for [steps](https://docs.github.com/en/actions/using-workflows/workflow-syntax-for-github-actions#jobsjob_idstepstimeout-minutes).
### `retry-codes`
**Required**:
A comma-separated value containing the exit codes which should cause a retry.
### `shell`
**Optional**:
The shell to use to run the commands.
Use this like the `shell` keyword for [steps](https://docs.github.com/en/actions/using-workflows/workflow-syntax-for-github-actions#jobsjob_idstepsshell).
**Default**: `"default-shell"`.
### `working-directory`
**Optional**:
The working directory where the commands are executed in.
Use this like the `working-directory` keyword for [steps](https://docs.github.com/en/actions/using-workflows/workflow-syntax-for-github-actions#jobsjob_idstepsworking-directory).
**Default**: `${{ github.workspace }}`.
### `max-retries`
**Optional**:
Maximum amount of times the specified commands should be tried before giving up.
**Default**: `"3"`.
## Example usage
```yaml
uses: TSRBerry/unstable-commands@v1
with:
commands: |
echo "Hello!"
sleep 2m
echo "Bye!"
timeout-minutes: "3"
retry-codes: "1,2,139"
```