Skip to content

Commit

Permalink
Fix missing wait for CI_STORAGE_PID before starting the runner
Browse files Browse the repository at this point in the history
  • Loading branch information
dimikot committed Oct 6, 2024
1 parent d418a4f commit 8909fe8
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 1 deletion.
3 changes: 2 additions & 1 deletion docker/ci-runner/guest/entrypoint.01-ci-storage-load.sh
Original file line number Diff line number Diff line change
Expand Up @@ -20,5 +20,6 @@ if [[ "$CI_STORAGE_HOST" != "" && -f ~/.ssh/id_rsa ]]; then
--storage-host="$CI_STORAGE_HOST" \
--storage-dir="$WORK_DIR/$GH_REPOSITORY" \
--slot-id="*" \
--local-dir="$local_dir" & export CI_STORAGE_PID=$!
--local-dir="$local_dir" \
& export CI_STORAGE_PID=$!
fi
5 changes: 5 additions & 0 deletions docker/ci-runner/guest/entrypoint.99-run.sh
Original file line number Diff line number Diff line change
Expand Up @@ -6,5 +6,10 @@
#
set -u -e

if [[ "${CI_STORAGE_PID:=}" != "" ]]; then
say "Waiting for the initial \"ci-storage load\" to finish (pid=$CI_STORAGE_PID)..."
wait "$CI_STORAGE_PID"
fi

say "Starting the self-hosted runner..."
cd ~/actions-runner && ./run.sh & wait $!

0 comments on commit 8909fe8

Please sign in to comment.