Skip to content

Commit

Permalink
try run docker container as a step in workflow (#349)
Browse files Browse the repository at this point in the history
  • Loading branch information
anakin87 authored Feb 7, 2024
1 parent 6b099b6 commit c5480af
Showing 1 changed file with 15 additions and 10 deletions.
25 changes: 15 additions & 10 deletions .github/workflows/unstructured.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,18 +27,23 @@ jobs:
matrix:
os: [ubuntu-latest]
python-version: ["3.8", "3.9", "3.10", "3.11"]
services:
unstructured-api:
image: "quay.io/unstructured-io/unstructured-api:latest"
ports:
- 8000:8000
options: >-
--health-cmd "curl --fail http://localhost:8000/healthcheck || exit 1"
--health-interval 10s
--health-timeout 1s
--health-retries 10

steps:
- name: Free up disk space
run: |
sudo docker image prune --all --force
- name: Run Unstructured API (docker)
run: |
docker run -d \
--name unstructured-api \
-p 8000:8000 \
--health-cmd "curl --fail http://localhost:8000/healthcheck || exit 1" \
--health-interval 10s \
--health-timeout 1s \
--health-retries 10 \
quay.io/unstructured-io/unstructured-api:latest
- uses: actions/checkout@v4

- name: Set up Python ${{ matrix.python-version }}
Expand Down

0 comments on commit c5480af

Please sign in to comment.