diff --git a/.gitea/workflows/gitainer-deploy.yaml b/.gitea/workflows/gitainer-deploy.yaml index 26bfb03..159f88d 100644 --- a/.gitea/workflows/gitainer-deploy.yaml +++ b/.gitea/workflows/gitainer-deploy.yaml @@ -16,6 +16,11 @@ on: required: false type: string default: ubuntu-22.04 + webhook_timeout: + description: Maximum time in seconds that curl will allow the Gitainer API webhook to take before failing. + required: false + type: number + default: 300 jobs: deploy-gitainer: @@ -32,7 +37,7 @@ jobs: if [ "${{ inputs.delayed_silent }}" = "true" ]; then echo "Delaying the webhook call by 10s using a detached container." echo "This gives the runner time to report job completion and clean up before it restarts." - docker run --rm -d alpine sh -c "apk add --no-cache curl && sleep 10 && curl --request POST 'http://192.168.1.150:9080/api/stacks/${{ inputs.stack_name }}?pretty'" + docker run --rm -d alpine sh -c "apk add --no-cache curl && sleep 10 && curl --max-time ${{ inputs.webhook_timeout }} --request POST 'http://192.168.1.150:9080/api/stacks/${{ inputs.stack_name }}?pretty'" else - curl --request POST "http://192.168.1.150:9080/api/stacks/${{ inputs.stack_name }}?pretty" + curl --max-time ${{ inputs.webhook_timeout }} --request POST "http://192.168.1.150:9080/api/stacks/${{ inputs.stack_name }}?pretty" fi diff --git a/.gitea/workflows/reload-act-runner.yaml b/.gitea/workflows/reload-act-runner.yaml index 2c3d789..b86fce5 100644 --- a/.gitea/workflows/reload-act-runner.yaml +++ b/.gitea/workflows/reload-act-runner.yaml @@ -29,16 +29,8 @@ jobs: # the primary runner executes the secondary restart webhook runs_on_label: runner-primary - pull-cache-primary: - needs: [diff, reload-secondary] - if: ${{ needs.diff.outputs.is_changed == 'true' }} - # Use the primary runner (which is now done restarting secondary) to prove it's alive and pull cache - uses: martin/chromart-gitea-actions/.gitea/workflows/pull-cache.yaml@main - with: - runs_on_label: runner-primary - pull-cache-secondary: - needs: [diff, pull-cache-primary] + needs: [diff, reload-secondary] if: ${{ needs.diff.outputs.is_changed == 'true' }} # Use the secondary runner (which is now done restarting) to prove it's alive and pull cache uses: martin/chromart-gitea-actions/.gitea/workflows/pull-cache.yaml@main