You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+14-14Lines changed: 14 additions & 14 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,6 +1,6 @@
1
-
# success-on-timeout
1
+
# run-bash-command
2
2
3
-
Run one or more commands with a time cap in GitHub Actions. If the command **times out**, this action **treats it as success** (exits `0`). If the command **fails before** the time cap, the action **fails** with the command’s exit code.
3
+
Run one or more commands with a time limit in GitHub Actions. If the command **times out**, this action **treats it as success** (exits `0`). If the command **fails before** the time limit, the action **fails** with the command’s exit code.
4
4
5
5
This is useful for long-running stress tests where “ran long enough without crashing” is considered a pass.
6
6
@@ -25,9 +25,9 @@ GNU `timeout` returns exit code **124** when the time limit is reached; this act
25
25
26
26
```yaml
27
27
- name: Conduct the test; treat timeout as SUCCESS (exit 0)
28
-
uses: equipez/success-on-timeout@v1
28
+
uses: equipez/run-bash-command@v1
29
29
with:
30
-
time: 350m
30
+
timelimit: 350m
31
31
command: |
32
32
command1
33
33
command2 argA argB
@@ -39,9 +39,9 @@ GNU `timeout` returns exit code **124** when the time limit is reached; this act
39
39
```yaml
40
40
- name: Run stress test (timeout => success)
41
41
id: stress
42
-
uses: equipez/success-on-timeout@v1
42
+
uses: equipez/run-bash-command@v1
43
43
with:
44
-
time: 350m
44
+
timelimit: 350m
45
45
command: |
46
46
./stress-test --big
47
47
@@ -57,7 +57,7 @@ GNU `timeout` returns exit code **124** when the time limit is reached; this act
57
57
58
58
| Name | Required | Default | Description |
59
59
|---|---:|---|---|
60
-
| `time` | yes | — | Time limit passed to `(g)timeout` (e.g. `300s`, `45m`, `2h`). |
60
+
| `timelimit` | yes | — | Time limit passed to `(g)timeout` (e.g. `300s`, `45m`, `2h`). |
| `signal` | no | `TERM` | Signal sent when the time limit is reached. |
63
63
| `kill-after` | no | `30s` | Wait time before sending `SIGKILL` after `signal`. |
@@ -81,9 +81,9 @@ GNU `timeout` returns exit code **124** when the time limit is reached; this act
81
81
### 1) Treat “ran 30 minutes” as pass, but fail on real errors
82
82
83
83
```yaml
84
-
- uses: equipez/success-on-timeout@v1
84
+
- uses: equipez/run-bash-command@v1
85
85
with:
86
-
time: 30m
86
+
timelimit: 30m
87
87
command: |
88
88
./run-long-test-suite
89
89
```
@@ -97,9 +97,9 @@ GNU `timeout` returns exit code **124** when the time limit is reached; this act
97
97
Some processes prefer `INT` (Ctrl+C) or `HUP` for graceful shutdown:
98
98
99
99
```yaml
100
-
- uses: equipez/success-on-timeout@v1
100
+
- uses: equipez/run-bash-command@v1
101
101
with:
102
-
time: 50m
102
+
timelimit: 50m
103
103
signal: INT
104
104
kill-after: 20s
105
105
command: |
@@ -109,9 +109,9 @@ Some processes prefer `INT` (Ctrl+C) or `HUP` for graceful shutdown:
109
109
### 3) Set a working directory
110
110
111
111
```yaml
112
-
- uses: equipez/success-on-timeout@v1
112
+
- uses: equipez/run-bash-command@v1
113
113
with:
114
-
time: 20m
114
+
timelimit: 20m
115
115
working-directory: matlab/tests
116
116
command: |
117
117
./run_tests.sh
@@ -133,7 +133,7 @@ If you set `install-coreutils: false`, ensure `gtimeout` is already available on
133
133
134
134
## Important notes & limitations
135
135
136
-
- **GitHub-hosted runner hard limit still applies.** Choose `time` with a buffer below your job’s `timeout-minutes` and below GitHub’s platform limit.
136
+
- **GitHub-hosted runner hard limit still applies.** Choose `timelimit` with a buffer below your job’s `timeout-minutes` and below GitHub’s platform limit.
137
137
- **This action requires Bash and `(g)timeout`.** It is intended for `ubuntu-latest` and `macos-latest` runners.
138
138
- **Timeout is treated as success by design.** Only use this when “time limit reached without crashing” is an acceptable success criterion.
139
139
- **Exit code semantics:** GNU `timeout` uses `124` for timeouts. If your wrapped command itself returns `124`, it will be indistinguishable from a timeout in this action’s current design.
0 commit comments