From bf09c6b40aad8f4cbdd6b32f15b881a01930daf0 Mon Sep 17 00:00:00 2001 From: Angel Rey Date: Tue, 22 Sep 2020 13:58:01 -0500 Subject: [PATCH] Fixed docker test --- .github/workflows/test.yml | 13 +++++++------ docker-compose.yml | 2 +- 2 files changed, 8 insertions(+), 7 deletions(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 78faa3ae..346cf620 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -3,6 +3,7 @@ on: [push] env: MAX_LINE_LENGTH: 110 + DOCKER_IMAGE: archivebox-ci jobs: lint: @@ -118,12 +119,12 @@ jobs: - name: Build image run: | - docker build . -t archivebox + docker build . -t "$DOCKER_IMAGE" - name: Init data dir run: | mkdir data - docker run -v "$PWD"/data:/data archivebox init + docker run -v "$PWD"/data:/data "$DOCKER_IMAGE" init - name: Run test server run: | @@ -132,16 +133,16 @@ jobs: - name: Add link run: | - docker run -v "$PWD"/data:/data --network host archivebox add http://www.test-nginx-1.local + docker run -v "$PWD"/data:/data --network host "$DOCKER_IMAGE" add http://www.test-nginx-1.local - name: Add stdin link run: | - echo "http://www.test-nginx-2.local" | docker run -i -v "$PWD"/data:/data archivebox add + echo "http://www.test-nginx-2.local" | docker run -i -v "$PWD"/data:/data "$DOCKER_IMAGE" add - name: List links run: | - docker run -v "$PWD"/data:/data archivebox list | grep -q "www.test-nginx-1.local" || { echo "The site 1 isn't in the list"; exit 1; } - docker run -v "$PWD"/data:/data archivebox list | grep -q "www.test-nginx-2.local" || { echo "The site 2 isn't in the list"; exit 1; } + docker run -v "$PWD"/data:/data "$DOCKER_IMAGE" list | grep -q "www.test-nginx-1.local" || { echo "The site 1 isn't in the list"; exit 1; } + docker run -v "$PWD"/data:/data "$DOCKER_IMAGE" list | grep -q "www.test-nginx-2.local" || { echo "The site 2 isn't in the list"; exit 1; } - name: Start docker-compose stack run: | diff --git a/docker-compose.yml b/docker-compose.yml index a209e959..f9a75748 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -12,7 +12,7 @@ version: '3.7' services: archivebox: # build: . - image: nikisweeting/archivebox:latest + image: ${DOCKER_IMAGE:-nikisweeting/archivebox:latest} command: server 0.0.0.0:8000 stdin_open: true tty: true