From 9cf14cc3a86c5ebd8be1adaffd74140a69f29055 Mon Sep 17 00:00:00 2001 From: Elian Doran Date: Wed, 7 Aug 2024 22:39:30 +0300 Subject: [PATCH] ci: Use healthcheck action --- .github/workflows/main-docker.yml | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/.github/workflows/main-docker.yml b/.github/workflows/main-docker.yml index 7c23a98f6..c50374614 100644 --- a/.github/workflows/main-docker.yml +++ b/.github/workflows/main-docker.yml @@ -52,10 +52,15 @@ jobs: cache-to: type=gha,mode=max - name: Run the container in the background - run: docker run -d --rm ${{ env.TEST_TAG }} + run: docker run -d --rm --name trilium_local ${{ env.TEST_TAG }} - name: Wait for the healthchecks to pass - run: timeout 60s sh -c 'until docker ps | grep ${{ env.TEST_TAG }} | grep -q healthy; do echo "Waiting for container to be healthy..."; sleep 2; done' + uses: stringbean/docker-healthcheck-action@v1 + with: + container: trilium_local + wait-time: 50 + require-status: running + require-healthy: true build_docker: name: Build Docker images