From 713d40a876a586f42ae86d798d25090942c80a46 Mon Sep 17 00:00:00 2001 From: Jeppe Bundgaard Date: Wed, 1 Jul 2026 10:53:25 +0200 Subject: [PATCH] Prune stale Docker networks in API CI --- .github/workflows/tests.yml | 3 +++ scripts/php-ci-test.sh | 5 +++++ 2 files changed, 8 insertions(+) diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index 0706f400..d480e7ff 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -227,6 +227,9 @@ jobs: with: node-version: 22 + - name: Prune stale Docker networks + run: docker network prune -f + - name: Boot local stack run: docker compose -f docker-compose.yml -f .github/docker-compose.ci.yml up -d traefik redis mysql-debug edge-broker php1 php2 php3 php4 php5 caddy diff --git a/scripts/php-ci-test.sh b/scripts/php-ci-test.sh index bd71641d..80b296e5 100644 --- a/scripts/php-ci-test.sh +++ b/scripts/php-ci-test.sh @@ -84,6 +84,10 @@ composer_install() { 'cd /var/www/html && composer install --no-interaction --prefer-source --no-progress' } +prune_unused_docker_networks() { + docker network prune -f >/dev/null 2>&1 || true +} + cleanup() { status="$?" collect_logs "$status" @@ -103,6 +107,7 @@ cleanup() { } trap cleanup EXIT INT TERM +prune_unused_docker_networks retry_command "${PHP_CI_DOCKER_RETRIES:-3}" docker compose $compose_files up -d redis mysql-debug php1 docker compose $compose_files exec -T php1 sh -lc '