add wait for primary death
All checks were successful
Reload Act Runner Stack to clear cache for workflows / diff (push) Successful in 1m9s
Reload Act Runner Stack to clear cache for workflows / reload-primary (push) Successful in 2s
Reload Act Runner Stack to clear cache for workflows / wait-for-primary-death (push) Successful in 32s
Reload Act Runner Stack to clear cache for workflows / reload-secondary (push) Successful in 3s
Reload Act Runner Stack to clear cache for workflows / wait-for-secondary-death (push) Successful in 32s
Reload Act Runner Stack to clear cache for workflows / pull-cache-secondary (push) Successful in 2s
All checks were successful
Reload Act Runner Stack to clear cache for workflows / diff (push) Successful in 1m9s
Reload Act Runner Stack to clear cache for workflows / reload-primary (push) Successful in 2s
Reload Act Runner Stack to clear cache for workflows / wait-for-primary-death (push) Successful in 32s
Reload Act Runner Stack to clear cache for workflows / reload-secondary (push) Successful in 3s
Reload Act Runner Stack to clear cache for workflows / wait-for-secondary-death (push) Successful in 32s
Reload Act Runner Stack to clear cache for workflows / pull-cache-secondary (push) Successful in 2s
This commit is contained in:
parent
529e8e82c8
commit
b8e28afa40
@ -18,9 +18,22 @@ jobs:
|
|||||||
stack_name: gitea_act_runner
|
stack_name: gitea_act_runner
|
||||||
# the secondary runner executes the primary restart webhook
|
# the secondary runner executes the primary restart webhook
|
||||||
runs_on_label: runner-secondary
|
runs_on_label: runner-secondary
|
||||||
|
# We use a detached webhook call so primary doesn't hang if the Gitainer stack takes 5 minutes to rebuild, and it avoids bridge network drop edge cases
|
||||||
|
delayed_silent: true
|
||||||
|
|
||||||
|
wait-for-primary-death:
|
||||||
|
needs: [diff, reload-primary]
|
||||||
|
if: ${{ needs.diff.outputs.is_changed == 'true' }}
|
||||||
|
runs-on: runner-secondary
|
||||||
|
steps:
|
||||||
|
- name: Wait for Gitainer to kill the secondary runner
|
||||||
|
run: |
|
||||||
|
echo "The detached webhook container sleeps for 10s before firing."
|
||||||
|
echo "We wait 30s here to guarantee the webhook fired and Gitainer destroyed the old secondary runner."
|
||||||
|
sleep 30
|
||||||
|
|
||||||
reload-secondary:
|
reload-secondary:
|
||||||
needs: [diff, reload-primary]
|
needs: [diff, wait-for-primary-death]
|
||||||
if: ${{ needs.diff.outputs.is_changed == 'true' }}
|
if: ${{ needs.diff.outputs.is_changed == 'true' }}
|
||||||
# ensuring the primary actually survived and restarted successfully
|
# ensuring the primary actually survived and restarted successfully
|
||||||
uses: https://gitea.chromart.cc/martin/chromart-gitea-actions/.gitea/workflows/gitainer-deploy.yaml@main
|
uses: https://gitea.chromart.cc/martin/chromart-gitea-actions/.gitea/workflows/gitainer-deploy.yaml@main
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user