Update ci.yml #18
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: CI / Docker Build | |
| on: | |
| push: | |
| branches: [ main ] | |
| pull_request: | |
| branches: [ main ] | |
| jobs: | |
| build: | |
| runs-on: ubuntu-latest | |
| env: | |
| # Force use of local FFmpeg in CI | |
| MODE: local | |
| FFMPEG_PATH: /usr/bin/ffmpeg | |
| FFPROBE_PATH: /usr/bin/ffprobe | |
| VMAF_PATH: /usr/local/bin/ffmpeg-quality-metrics | |
| steps: | |
| - name: Checkout repository | |
| uses: actions/checkout@v4 | |
| - name: Set up Python 3.10 | |
| uses: actions/setup-python@v4 | |
| with: | |
| python-version: '3.10' | |
| - name: Install system FFmpeg | |
| run: | | |
| sudo apt-get update | |
| sudo apt-get install -y ffmpeg | |
| # ffprobe comes bundled; install VMAF tools here if needed | |
| - name: Install Python dependencies | |
| run: | | |
| python -m pip install --upgrade pip | |
| pip install --no-cache-dir -r requirements.txt | |
| - name: Set PYTHONPATH for imports | |
| run: echo "PYTHONPATH=${{ github.workspace }}" >> $GITHUB_ENV | |
| - name: Build and load Docker image | |
| uses: docker/build-push-action@v4 | |
| with: | |
| context: . | |
| file: Dockerfile | |
| platforms: linux/amd64,linux/arm64 | |
| load: true | |
| push: false | |
| tags: ffmpeg-api-service:latest |