Description
I am attempting to get docker to slim down my github actions runner.
When the GitHub actions runs it runs this code:
while :;
do
cp -f "$DIR"/run-helper.sh.template "$DIR"/run-helper.sh
"$DIR"/run-helper.sh $* &
PID=$!
wait -f $PID
returnCode=$?
if [[ $returnCode -eq 2 ]]; then
echo "Restarting runner..."
else
echo "Exiting runner..."
# Unregister signal handling before exit
trap - INT TERM
# wait for last parts to be logged
wait $PID
exit $returnCode
fi
done
}
Essentially this copies run-helper.sh.template to run-helper.sh
However when I run this using slim build it fails to cp the file.
I have ran this with the option --run-target-as-user --keep-perms as the runner is running under the user 'runner'. However this doesn't change the outcome.
Any thoughts?