Skip to content

chore: require huggingface_hub>=0.16.0 for Gradio compatibility #3

chore: require huggingface_hub>=0.16.0 for Gradio compatibility

chore: require huggingface_hub>=0.16.0 for Gradio compatibility #3

name: Build, Test and Publish Docker image
on:
push:
branches: [ main ]
workflow_dispatch:
jobs:
smoke-and-publish:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Set up Python for smoke test
uses: actions/setup-python@v4
with:
python-version: '3.11'
- name: Install Python deps for smoke test
run: |
python -m pip install --upgrade pip
pip install --no-cache-dir -r requirements.txt
- name: Run smoke import test
run: |
python - <<'PY'
import sys

Check failure on line 28 in .github/workflows/docker-publish.yml

View workflow run for this annotation

GitHub Actions / .github/workflows/docker-publish.yml

Invalid workflow file

You have an error in your yaml syntax on line 28
try:
import gradio, google, PIL
except Exception as e:
print('Smoke test failed:', e)
sys.exit(1)
print('Smoke test passed')
PY
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v2
- name: Login to Docker Hub
uses: docker/login-action@v2
with:
username: ${{ secrets.DOCKER_USERNAME }}
password: ${{ secrets.DOCKER_PASSWORD }}
- name: Build and push Docker image
uses: docker/build-push-action@v4
with:
context: .
file: ./Dockerfile
push: true
tags: |
${{ secrets.DOCKER_USERNAME }}/car_classifier:latest
${{ secrets.DOCKER_USERNAME }}/car_classifier:${{ github.sha }}