docker-compose example: wait for Forgejo and the runner

Do not launch the demo workflow right away so it is easier to separate
the failures in the CI.
pull/177/head
Earl Warren 2024-04-07 17:04:38 +02:00
parent 82b6df801f
commit ed946d0f54
No known key found for this signature in database
GPG Key ID: 0579CB2928A78A00
1 changed files with 9 additions and 2 deletions

View File

@ -34,11 +34,18 @@ jobs:
cd examples/docker-compose cd examples/docker-compose
secret=$(openssl rand -hex 20) secret=$(openssl rand -hex 20)
sed -i -e "s/{SHARED_SECRET}/$secret/" compose-forgejo-and-runner.yml sed -i -e "s/{SHARED_SECRET}/$secret/" compose-forgejo-and-runner.yml
cli="docker compose --progress quiet -f compose-forgejo-and-runner.yml -f compose-demo-workflow.yml" cli="docker compose --progress quiet -f compose-forgejo-and-runner.yml"
# #
# Launch # Launch Forgejo & the runner
# #
$cli up -d $cli up -d
for delay in $(seq 60) ; do test -f /srv/runner-data/.runner && break ; sleep 30 ; done
test -f /srv/runner-data/.runner
#
# Run the demo workflow
#
cli="$cli -f compose-demo-workflow.yml"
$cli up -d demo-workflow
# #
# Wait for the demo workflow to complete # Wait for the demo workflow to complete
# #