Skip to content

Commit 7fadbd5

Browse files
committed
CI: Fix build-docker job not checking if Invidious starts successfully or not
1 parent a3375e5 commit 7fadbd5

File tree

3 files changed

+17
-1
lines changed

3 files changed

+17
-1
lines changed

.github/workflows/ci.yml

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -103,11 +103,19 @@ jobs:
103103
- name: Build Docker
104104
run: docker compose -f ${{ matrix.docker_compose_file }} build
105105

106+
- name: Change hmac_key on ${{ matrix.docker_compose_file }}
107+
run: sed -i '/hmac_key/s/CHANGE_ME!!/docker-build-hmac-key/' ${{ matrix.docker_compose_file }}
108+
106109
- name: Run Docker
107110
run: docker compose up -d
108111

109112
- name: Test Docker
110-
run: while curl -Isf http://localhost:3000; do sleep 1; done
113+
id: test
114+
run: curl -If http://localhost:3000 --retry 5 --retry-delay 1 --retry-all-errors
115+
116+
- name: Print Invidious container logs
117+
if: success() || steps.test.conclusion == 'failure'
118+
run: docker compose logs
111119

112120
lint:
113121

docker-compose-arm64.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:

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)