From ed946d0f549a69972293422ce2115085e4e62cc4 Mon Sep 17 00:00:00 2001 From: Earl Warren Date: Sun, 7 Apr 2024 17:04:38 +0200 Subject: [PATCH] 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. --- .forgejo/workflows/example-docker-compose.yml | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/.forgejo/workflows/example-docker-compose.yml b/.forgejo/workflows/example-docker-compose.yml index 174e0d5..fe2cace 100644 --- a/.forgejo/workflows/example-docker-compose.yml +++ b/.forgejo/workflows/example-docker-compose.yml @@ -34,11 +34,18 @@ jobs: cd examples/docker-compose secret=$(openssl rand -hex 20) 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 + 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 #