timeout curl
Some checks failed
Reload Act Runner Stack to clear cache for workflows / diff (push) Successful in 1m27s
Reload Act Runner Stack to clear cache for workflows / reload-primary (push) Successful in 4s
Reload Act Runner Stack to clear cache for workflows / reload-secondary (push) Successful in 59s
Reload Act Runner Stack to clear cache for workflows / pull-cache-secondary (push) Failing after 1m0s

This commit is contained in:
Martin Dimitrov 2026-03-07 12:41:04 -08:00
parent d55788cc4e
commit b9b7537c3f
2 changed files with 8 additions and 11 deletions

View File

@ -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

View File

@ -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