-
Notifications
You must be signed in to change notification settings - Fork 8
/
Copy pathaction.yml
32 lines (30 loc) · 926 Bytes
/
action.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
# action.yml
name: tutor-server
author: Tutor Team
description: |
Starts Postgres, Redis and tutor-server
tutor-server loads the mini book and starts on port 3001
All containers are detached
The action waits for tutor-server to respond to GET /ping
runs:
using: composite
steps:
- run: >-
docker-compose --file ${{ github.action_path }}/docker-compose.yml \
--project-name tutor-server \
up --detach
shell: bash
- run: |
echo
echo 'Waiting for tutor-server to become available (timeout: 5 minutes)...'
for retries in {0..300}; do
if curl --location --fail --silent localhost:3001/ping; then
echo 'tutor-server is up'
exit 0
else
sleep 1
fi
done
echo 'Timeout waiting for tutor-server to become available'
exit 1
shell: bash