From cc643f209a95cbf9fcc7e97ae3587454b35c3bc5 Mon Sep 17 00:00:00 2001 From: Fijxu Date: Thu, 15 May 2025 17:49:54 -0400 Subject: [PATCH] CI: Fix build-docker job not checking if Invidious starts successfully or not --- .github/workflows/ci.yml | 12 +++++++++++- docker-compose.yml | 4 ++++ 2 files changed, 15 insertions(+), 1 deletion(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 7a5e88501..27debc1ee 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -105,11 +105,21 @@ jobs: - name: Build Docker run: docker compose build + - name: Change hmac_key on docker-compose.yml + run: sed -i '/hmac_key/s/CHANGE_ME!!/docker-build-hmac-key/' docker-compose.yml + - name: Run Docker run: docker compose up -d - name: Test Docker - run: while curl -Isf http://localhost:3000; do sleep 1; done + id: test + run: curl -If http://localhost:3000 --retry 5 --retry-delay 1 --retry-all-errors + + - name: Print Invidious container logs + # Tells Github Actions to always run this step regardless of whether the previous step has failed + # Without this expression this step would simply be skipped when the previous step fails. + if: success() || steps.test.conclusion == 'failure' + run: docker compose logs lint: diff --git a/docker-compose.yml b/docker-compose.yml index afda87266..0de51feb9 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -14,6 +14,10 @@ services: restart: unless-stopped ports: - "127.0.0.1:3000:3000" + depends_on: + invidious-db: + condition: service_healthy + restart: true environment: # Please read the following file for a comprehensive list of all available # configuration options and their associated syntax: