From 65e233623702134c3dd75ed9e182082d4a4335e0 Mon Sep 17 00:00:00 2001 From: estebanthi Date: Mon, 5 Jan 2026 12:07:21 +0100 Subject: [PATCH] Cleanup leftover postgres containers --- .github/workflows/python-uv-ci.yml | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/.github/workflows/python-uv-ci.yml b/.github/workflows/python-uv-ci.yml index 19475e2..d59609a 100644 --- a/.github/workflows/python-uv-ci.yml +++ b/.github/workflows/python-uv-ci.yml @@ -127,6 +127,14 @@ jobs: if: ${{ inputs.typecheck_command != '' }} run: ${{ inputs.typecheck_command }} + - name: Cleanup existing database containers + if: ${{ inputs.enable_db }} + run: | + existing_ids="$(docker ps -aq --filter "name=^ci-postgres")" + if [ -n "$existing_ids" ]; then + docker rm -f $existing_ids >/dev/null 2>&1 || true + fi + - name: Start database if: ${{ inputs.enable_db }} run: |