[CI] add container naming and cleanup logic in workflows (#3526)

This commit is contained in:
YuBaoku
2025-08-22 11:42:57 +08:00
committed by GitHub
parent 2630260616
commit cc88671507
6 changed files with 51 additions and 1 deletions
@@ -124,7 +124,15 @@ jobs:
echo "==== PORT CLEAN COMPLETE ====" | tee -a $LOG_FILE
echo "========================================================="
echo "Ensuring no stale container named ${runner_name} ..."
if [ "$(docker ps -a -q -f name=${runner_name})" ]; then
echo "Removing stale container: ${runner_name}"
docker rm -f ${runner_name} || true
fi
docker run --rm --net=host \
--name ${runner_name} \
--cap-add=SYS_PTRACE --shm-size=64G \
-v $(pwd):/workspace -w /workspace \
-v "${CACHE_DIR}/gitconfig:/etc/gitconfig:ro" \