util: Add 'sudo' to rm WORK_DIR command (#496)

Unfortunately Actions uses docker contaienrs to create files on the
system with root permissions. The 'vagrant' user which we login to run
the Actions Runner, can't remove these files. However, 'vagrant' is part
of the sudo group and can therefore use sudo to remove these files.

I don't like this, but it works.
This commit is contained in:
Bobby R. Bruce
2023-10-24 14:51:19 -07:00
committed by GitHub
parent 6ddf8c94ee
commit b670ed9fba

View File

@@ -76,6 +76,6 @@ while true; do
./run.sh # This will complete with the runner being destroyed
# 4. Cleanup the machine
rm -rf "${WORK_DIR}"
sudo rm -rf "${WORK_DIR}"
docker system prune --force --volumes --all
done