ci: cloud-build the worker image to ghcr (no local docker needed)
This commit is contained in:
1 parent
f519a4fc4c
commit
cda62ee61a
1 file changed
+45
@@ -0,0 +1,45 @@
|
||||
name: build-worker
|
||||
# Cloud build for the Saw chamber serverless worker — no local docker needed.
|
||||
# Builds live/Dockerfile.worker (deps baked: numpy<2, transformers 4.51.3,
|
||||
# torch 2.4 cu121, runpod) and pushes to ghcr. After the first run, make the
|
||||
# package public (github.com/users/terrafying/packages) so RunPod can pull
|
||||
# it anonymously, then point the serverless template at the image.
|
||||
|
||||
on:
|
||||
push:
|
||||
branches: [master]
|
||||
paths: ["live/Dockerfile.worker", "live/worker.py", "live/server.py",
|
||||
"live/requirements.txt", "live/jlens_l18_qwen3-4b.pt",
|
||||
".github/workflows/build-worker.yml"]
|
||||
workflow_dispatch:
|
||||
|
||||
permissions:
|
||||
contents: read
|
||||
packages: write
|
||||
|
||||
jobs:
|
||||
build:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
|
||||
- uses: docker/setup-buildx-action@v3
|
||||
|
||||
- name: Log in to GHCR
|
||||
uses: docker/login-action@v3
|
||||
with:
|
||||
registry: ghcr.io
|
||||
username: ${{ github.actor }}
|
||||
password: ${{ secrets.GITHUB_TOKEN }}
|
||||
|
||||
- name: Build and push
|
||||
uses: docker/build-push-action@v6
|
||||
with:
|
||||
context: ./live
|
||||
file: ./live/Dockerfile.worker
|
||||
push: true
|
||||
tags: |
|
||||
ghcr.io/terrafying/saw-chamber-worker:v2
|
||||
ghcr.io/terrafying/saw-chamber-worker:latest
|
||||
cache-from: type=gha
|
||||
cache-to: type=gha,mode=max
|
||||
Reference in new issue
Block a user