Add RunPod endpoint update and worker purge to CI
All checks were successful
Build and Push Docker Image / build (push) Successful in 45s
All checks were successful
Build and Push Docker Image / build (push) Successful in 45s
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 <noreply@anthropic.com>
This commit is contained in:
@@ -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 }}\" }) }"
|
||||
}'
|
||||
|
||||
Reference in New Issue
Block a user