Skip to content

Commit 38d47c1

Browse files
committed
Fix child cleanup
1 parent 8b35dc7 commit 38d47c1

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

action.sh

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -194,6 +194,15 @@ EOF
194194
195195
chmod +x /etc/systemd/system/shutdown.sh
196196
197+
mv /usr/bin/tail /usr/bin/tail.real && \
198+
echo '#!/bin/bash' > /usr/bin/tail && \
199+
echo 'if [ "$GITHUB_ACTIONS" = "true" ]; then' >> /usr/bin/tail && \
200+
echo ' exec dumb-init /bin/tail.real "$@"' >> /usr/bin/tail && \
201+
echo 'else' >> /usr/bin/tail && \
202+
echo ' exec /usr/bin/tail.real "$@"' >> /usr/bin/tail && \
203+
echo 'fi' >> /usr/bin/tail && \
204+
chmod +x /usr/bin/tail
205+
197206
echo "Registering runners ${RUNNER_ID}-1 and ${RUNNER_ID}-2..."
198207
su -s /bin/bash -c "cd /actions-runner-1/;/actions-runner-1/config.sh --url https://github.com/${GITHUB_REPOSITORY} --token ${RUNNER_TOKEN} --name ${RUNNER_ID}-1 --labels ${VM_ID} --unattended --disableupdate" runner
199208
su -s /bin/bash -c "cd /actions-runner-2/;/actions-runner-2/config.sh --url https://github.com/${GITHUB_REPOSITORY} --token ${RUNNER_TOKEN} --name ${RUNNER_ID}-2 --labels ${VM_ID} --unattended --disableupdate" runner

0 commit comments

Comments
 (0)