From db99316ebe47057c4b6e82c2cf9840b4460343db Mon Sep 17 00:00:00 2001 From: E Date: Fri, 2 Oct 2026 22:55:45 -0400 Subject: [PATCH] =?UTF-8?q?ci:=20build=20workflows=20roll=20images=20out?= =?UTF-8?q?=20to=20runpod=20endpoints=20=E2=80=94=20PATCH=20the=20template?= =?UTF-8?q?'s=20imageName=20onto=20the=20fresh=20:sha=20tag=20so=20pushes?= =?UTF-8?q?=20actually=20ship?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .github/workflows/build-worker.yml | 20 ++++++++++++++++++++ .github/workflows/build-worker70.yml | 20 ++++++++++++++++++++ 2 files changed, 40 insertions(+) diff --git a/.github/workflows/build-worker.yml b/.github/workflows/build-worker.yml index 67e0eaa..14ff89c 100644 --- a/.github/workflows/build-worker.yml +++ b/.github/workflows/build-worker.yml @@ -45,6 +45,26 @@ jobs: cache-from: type=gha cache-to: type=gha,mode=max + # Roll out: repoint the endpoint's template at the immutable :sha tag we + # just pushed. Warm workers keep the old image until their idle timeout + # recycles them — that lag is expected, not a failed rollout. + - name: Roll out to RunPod endpoint + env: + RUNPOD_API_KEY: ${{ secrets.RUNPOD_API_KEY }} + TEMPLATE_ID: zim816iihe # saw-chamber-v4 endpoint czgfu4ls4nhyp6 + IMAGE: ghcr.io/terrafying/saw-chamber-worker:${{ github.sha }} + run: | + if [ -z "$RUNPOD_API_KEY" ]; then echo "no RUNPOD_API_KEY secret - skipping rollout"; exit 0; fi + code=$(curl -s -o /tmp/rollout.json -w "%{http_code}" -m 60 -X PATCH \ + -H "User-Agent: Mozilla/5.0" -H "Content-Type: application/json" \ + -H "Authorization: Bearer $RUNPOD_API_KEY" \ + "https://rest.runpod.io/v1/templates/$TEMPLATE_ID" \ + -d "{\"imageName\": \"$IMAGE\"}") + echo "template PATCH HTTP $code" + python3 -c "import json; print('template now pins:', json.load(open('/tmp/rollout.json')).get('imageName'))" \ + || cat /tmp/rollout.json + [ "$code" = "200" ] || { echo "rollout FAILED"; exit 1; } + # RunPod pulls anonymously, so the package must be public. Code in the # image is already public via the site tarballs — no new exposure. - name: Make package public diff --git a/.github/workflows/build-worker70.yml b/.github/workflows/build-worker70.yml index 73a05b7..56e0729 100644 --- a/.github/workflows/build-worker70.yml +++ b/.github/workflows/build-worker70.yml @@ -40,3 +40,23 @@ jobs: ghcr.io/terrafying/saw-chamber-worker-70b:${{ github.sha }} cache-from: type=gha cache-to: type=gha,mode=max + + # Roll out: repoint the 70B endpoint's template at the immutable :sha + # tag we just pushed. Warm workers keep the old image until their idle + # timeout recycles them — that lag is expected, not a failed rollout. + - name: Roll out to RunPod endpoint + env: + RUNPOD_API_KEY: ${{ secrets.RUNPOD_API_KEY }} + TEMPLATE_ID: p3l0rjxwf7 # saw-chamber-70b endpoint dkcntqsm9y6n0g + IMAGE: ghcr.io/terrafying/saw-chamber-worker-70b:${{ github.sha }} + run: | + if [ -z "$RUNPOD_API_KEY" ]; then echo "no RUNPOD_API_KEY secret - skipping rollout"; exit 0; fi + code=$(curl -s -o /tmp/rollout.json -w "%{http_code}" -m 60 -X PATCH \ + -H "User-Agent: Mozilla/5.0" -H "Content-Type: application/json" \ + -H "Authorization: Bearer $RUNPOD_API_KEY" \ + "https://rest.runpod.io/v1/templates/$TEMPLATE_ID" \ + -d "{\"imageName\": \"$IMAGE\"}") + echo "template PATCH HTTP $code" + python3 -c "import json; print('template now pins:', json.load(open('/tmp/rollout.json')).get('imageName'))" \ + || cat /tmp/rollout.json + [ "$code" = "200" ] || { echo "rollout FAILED"; exit 1; }