Initial release: LLM Safety Middleware v2.0.0 #1
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: Docker Build | |
| on: | |
| push: | |
| branches: [main, master] | |
| pull_request: | |
| branches: [main, master] | |
| jobs: | |
| build: | |
| name: Build Docker image | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout code | |
| uses: actions/checkout@v4 | |
| - name: Set up Docker Buildx | |
| uses: docker/setup-buildx-action@v3 | |
| - name: Build image | |
| uses: docker/build-push-action@v5 | |
| with: | |
| context: . | |
| push: false | |
| tags: llm-safety-middleware:ci | |
| cache-from: type=gha | |
| cache-to: type=gha,mode=max | |
| - name: Smoke-test health endpoint | |
| run: | | |
| docker run -d --name smoke-test \ | |
| -e LLM_BACKEND_TYPE=ollama \ | |
| -e LLM_BASE_URL=http://localhost:99999 \ | |
| -e LLM_MODEL=test \ | |
| -p 8000:8000 \ | |
| llm-safety-middleware:ci | |
| sleep 10 | |
| curl -f http://localhost:8000/health | |
| docker stop smoke-test |