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
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:
parent
d55788cc4e
commit
b9b7537c3f
@ -16,6 +16,11 @@ on:
|
|||||||
required: false
|
required: false
|
||||||
type: string
|
type: string
|
||||||
default: ubuntu-22.04
|
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:
|
jobs:
|
||||||
deploy-gitainer:
|
deploy-gitainer:
|
||||||
@ -32,7 +37,7 @@ jobs:
|
|||||||
if [ "${{ inputs.delayed_silent }}" = "true" ]; then
|
if [ "${{ inputs.delayed_silent }}" = "true" ]; then
|
||||||
echo "Delaying the webhook call by 10s using a detached container."
|
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."
|
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
|
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
|
fi
|
||||||
|
|||||||
@ -29,16 +29,8 @@ jobs:
|
|||||||
# the primary runner executes the secondary restart webhook
|
# the primary runner executes the secondary restart webhook
|
||||||
runs_on_label: runner-primary
|
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:
|
pull-cache-secondary:
|
||||||
needs: [diff, pull-cache-primary]
|
needs: [diff, reload-secondary]
|
||||||
if: ${{ needs.diff.outputs.is_changed == 'true' }}
|
if: ${{ needs.diff.outputs.is_changed == 'true' }}
|
||||||
# Use the secondary runner (which is now done restarting) to prove it's alive and pull cache
|
# 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
|
uses: martin/chromart-gitea-actions/.gitea/workflows/pull-cache.yaml@main
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user