From d0140fa2b34ebe6b4d2199b5c750e72d7f235085 Mon Sep 17 00:00:00 2001 From: Nick Date: Sat, 27 Dec 2025 10:20:45 +1300 Subject: [PATCH] Add RunPod endpoint update and worker purge to CI MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Updates the serverless endpoint with new image tag and purges existing workers to force restart with the new image after build. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 --- .gitea/workflows/build.yaml | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/.gitea/workflows/build.yaml b/.gitea/workflows/build.yaml index d3ef45b..00e1743 100644 --- a/.gitea/workflows/build.yaml +++ b/.gitea/workflows/build.yaml @@ -8,6 +8,7 @@ on: jobs: build: runs-on: ubuntu-latest + timeout-minutes: 120 container: image: catthehacker/ubuntu:act-latest @@ -42,3 +43,19 @@ jobs: labels: ${{ steps.meta.outputs.labels }} cache-from: type=gha cache-to: type=gha,mode=max + + - name: Update RunPod Endpoint + run: | + curl -s -X POST "https://api.runpod.io/graphql?api_key=${{ secrets.RUNPOD_API_KEY }}" \ + -H "Content-Type: application/json" \ + -d '{ + "query": "mutation { saveEndpoint(input: { id: \"${{ secrets.RUNPOD_ENDPOINT_ID }}\", imageName: \"flybynight69420/comfyui-serverless:latest\" }) { id imageName } }" + }' + + - name: Purge RunPod Workers + run: | + curl -s -X POST "https://api.runpod.io/graphql?api_key=${{ secrets.RUNPOD_API_KEY }}" \ + -H "Content-Type: application/json" \ + -d '{ + "query": "mutation { endpointPurgeQueue(input: { endpointId: \"${{ secrets.RUNPOD_ENDPOINT_ID }}\" }) }" + }'