Skip to content

Commit c2fb609

Browse files
authored
Update README.md with wait-for script
1 parent 5ff89aa commit c2fb609

File tree

1 file changed

+17
-0
lines changed

1 file changed

+17
-0
lines changed

README.md

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,9 @@ jobs:
1919
steps:
2020
- uses: jonpugh/goatscripts@v1
2121
```
22+
## Scripts
23+
- `run-with-summary`: Runs a command and generates a markdown summary with output and execution details.
24+
- `wait-for`: Runs a command repeatedly until it passes.
2225

2326
## Run With Summary
2427

@@ -70,3 +73,17 @@ jobs:
7073
Set SUMMARY env var to add *any* markdown **you want** to the report file.
7174
```
7275
76+
## wait-for
77+
78+
Use for pausing scripts until a command passes.
79+
80+
Use cases:
81+
82+
- Docker containers that have to wait for a database server to start
83+
- Test scripts that have to wait for your project to initialize.
84+
- Better than "sleep": Sometimes you need to wait. Instead of sleeping a fixed number of seconds, run a command that will pass once the thing you need is ready.
85+
86+
```
87+
wait-for mysql-ready
88+
wait-for curl https://deploy-url/ready
89+
```

0 commit comments

Comments
 (0)