Skip to content

Commit

Permalink
bugfix : spawn only missing containers
Browse files Browse the repository at this point in the history
  • Loading branch information
gr0vity-dev committed Dec 21, 2022
1 parent 2304e1d commit 0c027a4
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions respawn
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,6 @@ SPAWN_COUNT=$((($SPAWN_COUNT - $CURRENT_RUNNER_COUNT)))
fi



# This is done outside the scope of the LXD container because exporting variables is not working as expected
_PROTO="$(echo "${RUNNER_URL}" | grep :// | sed -e's,^\(.*://\).*,\1,g')"
_URL="$(echo "${RUNNER_URL/${_PROTO}/}")"
Expand Down Expand Up @@ -68,10 +67,10 @@ EOF


#ephemeral github runners will be delisted (on github.com) after 1 day of being offline
for i in $(seq ${2})
for i in $(seq ${SPAWN_COUNT})
do
NAME=$(mktemp -u github-XXXXXXXX)
lxc copy ${1} "${NAME}" --ephemeral
lxc copy ${LXD_CONTAINER} "${NAME}" --ephemeral
lxc start "${NAME}"
lxc storage volume create docker "${NAME}"
lxc config device add "${NAME}" docker disk pool=docker source="${NAME}" path=/var/lib/docker
Expand Down

0 comments on commit 0c027a4

Please sign in to comment.