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 }}\" }) }" + }'