Skip to content

Commit

Permalink
ci: Use healthcheck action
Browse files Browse the repository at this point in the history
  • Loading branch information
eliandoran committed Aug 7, 2024
1 parent e64234b commit 9cf14cc
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions .github/workflows/main-docker.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 9cf14cc

Please sign in to comment.