From 493dd91d6302179731ab6b97dd9d2ceba24bb5fb Mon Sep 17 00:00:00 2001 From: aasim Date: Tue, 23 Apr 2024 18:46:01 -0400 Subject: [PATCH] attempt to resolve port allocation error --- .github/workflows/pr_ci_frontend.yaml | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/.github/workflows/pr_ci_frontend.yaml b/.github/workflows/pr_ci_frontend.yaml index bdc1c1841..6d1074666 100644 --- a/.github/workflows/pr_ci_frontend.yaml +++ b/.github/workflows/pr_ci_frontend.yaml @@ -26,6 +26,17 @@ jobs: - name: Checkout uses: actions/checkout@v4 + - name: Clean up any existing containers + run: | + docker stop $(docker ps -aq) || true + docker rm $(docker ps -aq) || true + + - name: Check Port Availability + run: | + ! nc -z localhost ${{ secrets.FRONTEND_PORT }} && \ + ! nc -z localhost ${{ secrets.BACKEND_PORT }} && \ + ! nc -z localhost 5432 + - name: Set up Docker Compose run: | echo "FRONTEND_PORT=${{ secrets.FRONTEND_PORT }}" >> .env