CI: Fix build-docker job not checking if Invidious starts successfully or not

This commit is contained in:
Fijxu 2025-05-15 17:49:54 -04:00
parent 381074fce1
commit cc643f209a
No known key found for this signature in database
GPG Key ID: 32C1DDF333EDA6A4
2 changed files with 15 additions and 1 deletions

View File

@ -105,11 +105,21 @@ jobs:
- name: Build Docker - name: Build Docker
run: docker compose build 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 - name: Run Docker
run: docker compose up -d run: docker compose up -d
- name: Test Docker - 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: lint:

View File

@ -14,6 +14,10 @@ services:
restart: unless-stopped restart: unless-stopped
ports: ports:
- "127.0.0.1:3000:3000" - "127.0.0.1:3000:3000"
depends_on:
invidious-db:
condition: service_healthy
restart: true
environment: environment:
# Please read the following file for a comprehensive list of all available # Please read the following file for a comprehensive list of all available
# configuration options and their associated syntax: # configuration options and their associated syntax: