Fail fast DDP startup and HF checkpoint readiness #19
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: Build App Image | |
| on: | |
| push: | |
| branches: | |
| - main | |
| - master | |
| paths: | |
| - "Dockerfile" | |
| - ".dockerignore" | |
| - "web/**" | |
| - "src/api/**" | |
| - "src/inference/**" | |
| - "src/game/**" | |
| - "src/data/**" | |
| - "alembic/**" | |
| - "alembic.ini" | |
| - "pyproject.toml" | |
| - "uv.lock" | |
| - ".github/workflows/build-app-image.yml" | |
| pull_request: | |
| paths: | |
| - "Dockerfile" | |
| - ".dockerignore" | |
| - "web/**" | |
| - "src/api/**" | |
| - "src/inference/**" | |
| - "src/game/**" | |
| - "src/data/**" | |
| - "alembic/**" | |
| - "alembic.ini" | |
| - "pyproject.toml" | |
| - "uv.lock" | |
| - ".github/workflows/build-app-image.yml" | |
| workflow_dispatch: | |
| concurrency: | |
| group: build-app-image-${{ github.ref }} | |
| cancel-in-progress: true | |
| jobs: | |
| docker: | |
| runs-on: ubuntu-latest | |
| permissions: | |
| contents: read | |
| packages: write | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v4 | |
| - name: Set up Docker Buildx | |
| uses: docker/setup-buildx-action@v3 | |
| - name: Log in to GHCR | |
| if: github.event_name != 'pull_request' | |
| uses: docker/login-action@v3 | |
| with: | |
| registry: ghcr.io | |
| username: ${{ github.actor }} | |
| password: ${{ secrets.GITHUB_TOKEN }} | |
| - name: Extract Docker metadata | |
| id: meta | |
| uses: docker/metadata-action@v5 | |
| with: | |
| images: ghcr.io/${{ github.repository_owner }}/ataxx-app | |
| tags: | | |
| type=sha,format=long | |
| type=ref,event=branch | |
| type=raw,value=latest,enable={{is_default_branch}} | |
| - name: Build and (optionally) push | |
| uses: docker/build-push-action@v6 | |
| with: | |
| context: . | |
| file: Dockerfile | |
| target: runtime | |
| push: ${{ github.event_name != 'pull_request' }} | |
| tags: ${{ steps.meta.outputs.tags }} | |
| labels: ${{ steps.meta.outputs.labels }} | |
| cache-from: type=gha | |
| cache-to: type=gha,mode=max |