Skip to content

Commit cc643f2

Browse files
committed
CI: Fix build-docker job not checking if Invidious starts successfully or not
1 parent 381074f commit cc643f2

File tree

2 files changed

+15
-1
lines changed

2 files changed

+15
-1
lines changed

.github/workflows/ci.yml

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -105,11 +105,21 @@ jobs:
105105
- name: Build Docker
106106
run: docker compose build
107107

108+
- name: Change hmac_key on docker-compose.yml
109+
run: sed -i '/hmac_key/s/CHANGE_ME!!/docker-build-hmac-key/' docker-compose.yml
110+
108111
- name: Run Docker
109112
run: docker compose up -d
110113

111114
- name: Test Docker
112-
run: while curl -Isf http://localhost:3000; do sleep 1; done
115+
id: test
116+
run: curl -If http://localhost:3000 --retry 5 --retry-delay 1 --retry-all-errors
117+
118+
- name: Print Invidious container logs
119+
# Tells Github Actions to always run this step regardless of whether the previous step has failed
120+
# Without this expression this step would simply be skipped when the previous step fails.
121+
if: success() || steps.test.conclusion == 'failure'
122+
run: docker compose logs
113123

114124
lint:
115125

docker-compose.yml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,10 @@ services:
1414
restart: unless-stopped
1515
ports:
1616
- "127.0.0.1:3000:3000"
17+
depends_on:
18+
invidious-db:
19+
condition: service_healthy
20+
restart: true
1721
environment:
1822
# Please read the following file for a comprehensive list of all available
1923
# configuration options and their associated syntax:

0 commit comments

Comments
 (0)