ci: publish the example images to ghcr and make them runnable #235
Workflow file for this run
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: lint | |
| on: | |
| pull_request: | |
| push: | |
| branches: [main] | |
| jobs: | |
| pre-commit: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v7 | |
| - uses: actions/setup-python@v6 | |
| with: | |
| python-version: "3.12" | |
| # Runs every hook in .pre-commit-config.yaml against all files. | |
| - uses: pre-commit/action@v3.0.1 | |
| # Every example pulls the orchestrator from ../compose.orchestrator.yml via | |
| # `extends`, so one edit there breaks all of them and nobody runs all of them | |
| # before merging. `config` parses and merges; it builds and starts nothing. | |
| compose: | |
| runs-on: ubuntu-latest | |
| env: | |
| HF_TOKEN: dummy # api-proxy requires it; every other variable has a default | |
| steps: | |
| - uses: actions/checkout@v7 | |
| - name: Validate every example's compose file | |
| run: | | |
| status=0 | |
| for dir in */; do | |
| example=${dir%/} | |
| [ -f "$example/compose.yml" ] || continue | |
| docker compose -f "$example/compose.yml" config --quiet || status=1 | |
| if [ -f "$example/compose.image.yml" ]; then | |
| docker compose -f "$example/compose.yml" \ | |
| -f "$example/compose.image.yml" config --quiet || status=1 | |
| fi | |
| done | |
| exit $status |