Skip to content

Commit

Permalink
refactor: rename build step and streamline Docker image handling in C…
Browse files Browse the repository at this point in the history
…I workflow
  • Loading branch information
pavelzbornik committed Nov 22, 2024
1 parent d7e9b91 commit a06cfdc
Showing 1 changed file with 3 additions and 5 deletions.
8 changes: 3 additions & 5 deletions .github/workflows/CI.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -31,17 +31,15 @@ jobs:
docker-images: false
swap-storage: true

- name: Build Docker image
- name: Build and export to Docker
uses: docker/build-push-action@v6
with:
context: .
load: true
push: false
tags: whisperx-fastapi:latest
cache-from: type=gha
cache-to: type=gha,mode=max

- name: Load Docker image
run: docker load -i $(docker save whisperx-fastapi:latest -o whisperx-fastapi.tar)

- name: Run tests
run: docker run --env MY_ENV_VAR=${{ secrets.HF_TOKEN }} --env WHISPER_MODEL=tiny --env DEFAULT_LANG=en --entrypoint pytest whisperx-fastapi:latest
run: docker run --rm --env MY_ENV_VAR=${{ secrets.HF_TOKEN }} --env WHISPER_MODEL=tiny --env DEFAULT_LANG=en --entrypoint pytest whisperx-fastapi:latest

0 comments on commit a06cfdc

Please sign in to comment.