mirror of
https://github.com/nick-fields/retry.git
synced 2026-10-11 14:34:15 +03:00
Add on_retry_command input to optionally run cmd before a retry (#33)
* minor: add on_retry_command input to optionally run cmd before a retry * test: add test for on-retry-command failure
This commit is contained in:
1 parent
025c480d85
commit
7c68161adf
6 files changed
+107
-25
No files matched your search
@@ -60,6 +60,26 @@ jobs:
|
||||
actual: ${{ steps.sad_path_wait_sec.outputs.exit_error }}
|
||||
comparison: contains
|
||||
|
||||
- name: on-retry-cmd
|
||||
id: on-retry-cmd
|
||||
uses: ./
|
||||
continue-on-error: true
|
||||
with:
|
||||
timeout_minutes: 1
|
||||
max_attempts: 3
|
||||
command: node -e "process.exit(1)"
|
||||
on_retry_command: node -e "console.log('this is a retry command')"
|
||||
|
||||
- name: on-retry-cmd (on-retry fails)
|
||||
id: on-retry-cmd-fails
|
||||
uses: ./
|
||||
continue-on-error: true
|
||||
with:
|
||||
timeout_minutes: 1
|
||||
max_attempts: 3
|
||||
command: node -e "process.exit(1)"
|
||||
on_retry_command: node -e "throw new Error('This is an on-retry command error')"
|
||||
|
||||
- name: sad-path (error)
|
||||
id: sad_path_error
|
||||
uses: ./
|
||||
|
||||
Reference in new issue
Block a user