diff --git a/.github/workflows/cryptitalk-image.yml b/.github/workflows/cryptitalk-image.yml new file mode 100644 index 00000000000..85d4e101222 --- /dev/null +++ b/.github/workflows/cryptitalk-image.yml @@ -0,0 +1,57 @@ +# .github/workflows/cryptitalk-image.yml +# +# Build cryptitalk's LiteLLM fork into a Docker image and push to +# ghcr.io/cryptitalk/litellm. Triggered on push to any cryptitalk-* +# branch so the fix-branch image lands automatically. The image +# carries the upstream Dockerfile's runtime exactly — we only add +# the bare-field-schema rewrap patch in litellm/llms/vertex_ai/ +# common_utils.py (see commit history on this branch). +# +# Production consumer: cryptitalk-wallet-litellm's Deployment +# manifest references this image by sha-tag and pulls on every +# rollout. +name: cryptitalk-image +on: + push: + branches: + - 'cryptitalk-*' + workflow_dispatch: + +permissions: + contents: read + packages: write + +jobs: + build: + runs-on: ubuntu-latest + timeout-minutes: 30 + steps: + - uses: actions/checkout@v4 + + - name: Set up Docker Buildx + uses: docker/setup-buildx-action@v3 + + - name: Log in to GitHub Container Registry + uses: docker/login-action@v3 + with: + registry: ghcr.io + username: ${{ github.actor }} + password: ${{ secrets.GITHUB_TOKEN }} + + - name: Compute tags + id: tags + run: | + echo "sha=${GITHUB_SHA::12}" >> "$GITHUB_OUTPUT" + echo "branch=${GITHUB_REF#refs/heads/}" >> "$GITHUB_OUTPUT" + + - name: Build and push + uses: docker/build-push-action@v6 + with: + context: . + file: ./Dockerfile + push: true + tags: | + ghcr.io/cryptitalk/litellm:${{ steps.tags.outputs.branch }} + ghcr.io/cryptitalk/litellm:${{ steps.tags.outputs.sha }} + cache-from: type=gha + cache-to: type=gha,mode=max