Replies: 1 comment
-
TL;DR: It varies based on the action you run. Explanation: I don't think Act itself will take up much space, not when I install it myself. However, I'm pretty sure docker images that you will be using to run the actions won't be anywhere small. I built a custom Ubuntu image to build Tauri, and the docker image takes up 2.2GB of my disk space. What you can do is make a Dockerfile, and make a script that builds the docker image, then runs the action so you can delete the docker image whenever you want and it will just build it back whenever you run the script. Rebuilding the docker image every action is slow, but it works if you really want to save disk space. Here's the script I use for my own project: project_name=(👉your-project-name-here👈)
# Check Docker installation
if ! command -v docker 2>&1 >/dev/null
then
echo "Docker not found, please install or check your PATH environment variable."
exit
fi
# Check Act installation
if ! command -v act 2>&1 >/dev/null
then
echo "Act not found, please install or check your PATH environment variable."
exit
fi
# Build Docker image
if [[ "$(docker images -q ubuntu:${project_name} 2> /dev/null)" == "" ]]; then
echo "Building Docker image for cross compilation"
docker build -t "ubuntu:$project_name" scripts/Docker/Ubuntu
# Uncomment the next line if you want to clear Docker cache after every build
# docker builder prune -f
fi
# Run the action
act -j build -P ubuntu-latest="ubuntu:$project_name"
# Timer
if (( $SECONDS > 3600 )) ; then
let "hours=SECONDS/3600"
let "minutes=(SECONDS%3600)/60"
let "seconds=(SECONDS%3600)%60"
echo "Cross complilation task completed in ${hours}h ${minutes}min ${seconds}s"
elif (( $SECONDS > 60 )) ; then
let "minutes=(SECONDS%3600)/60"
let "seconds=(SECONDS%3600)%60"
echo "Cross complilation task completed in ${minutes}min ${seconds}s"
else
echo "Cross complilation task completed in ${SECONDS}s"
fi I can delete my Docker image in Docker Desktop and it rebuilds it whenever I run this script again. Edit: fix syntax highlighting |
Beta Was this translation helpful? Give feedback.
-
I've a 256 GB M1 Mac, with a round 80GB left, how much diskspace will act takes up after install? or does it depends on the action I create?
Beta Was this translation helpful? Give feedback.
All reactions